- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在尝试让“asciifolding”为我的 Rails 应用程序工作时遇到了非常糟糕的时间。我想搜索包含“accented”字符的单词,例如我希望在搜索“foroige”时出现“foróige”。我尝试了很多东西。下面是其中的几个。
analysis: {
analyzer: {
text: {
tokenizer: "standard",
filter: ["standard","lowercase", "asciifolding"],
char_filter: 'html_strip'
},
sortable: {
tokenizer: "keyword",
filter: ["lowercase", "asciifolding"],
char_filter: 'html_strip'
}
}
}
我还通过遵循 James Healey charmap for sphinx for accented characters 尝试了 char_filter。 http://yob.id.au/2008/05/08/thinking-sphinx-and-unicode.html
非常感谢任何帮助。
最佳答案
在试用它之后,我解决了这个问题。我不得不更改默认分析器的行为。
analyzer: {
default: {
tokenizer: "standard",
filter: ["standard", "lowercase", "asciifolding"]
},
text: {
tokenizer: "standard",
filter: ["standard", "lowercase"],
char_filter: 'html_strip'
},
sortable: {
tokenizer: "keyword",
filter: ["lowercase"],
char_filter: 'html_strip'
}
}
关于ruby-on-rails-3.2 - Asciifolding 不工作 Elastic Search Rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18718314/
我使用 marvel 插件创建了这个测试索引: POST /test { "index" : { "analysis" : { "analyzer" : {
在我的分析器中,我添加了 asciifolding 过滤器。在大多数情况下,这非常有效,但在使用丹麦语时,我不想规范化 øæå 字符,因为“rød”和“rod”是非常不同的词。 我们正在使用托管的弹性
谁能告诉我为什么下面的映射中的“模式”标记符上不执行“asciifolding”? 我需要使用“模式”标记器,但是我也不需要区分带有重音或没有“asciifolding”功能的重音功能的单词。 我需要
将 Elasticsearch JDBC 导入器与此配置一起使用: bin=/usr/share/elasticsearch/elasticsearch-jdbc-2.1.1.2/bin lib=/u
我正在为网页上的所有名称编制索引,其中包含带有“José”等重音符号的字符。我希望能够用“Jose”和“José”搜索这个名字。 我应该如何为只有一个字段“名称”的简单索引设置索引映射和分析器? 我为
我在尝试让“asciifolding”为我的 Rails 应用程序工作时遇到了非常糟糕的时间。我想搜索包含“accented”字符的单词,例如我希望在搜索“foroige”时出现“foróige”。我
我在我的 Rails 4 应用程序中创建了一个搜索引擎,它工作得很好,但我很难让 asciifolding 过滤器工作。我的模型有很多带重音的术语,除非拼写完全正确,否则不会出现,即:我想搜索“Rod
我是一名优秀的程序员,十分优秀!