Solr 混淆了 "television" 和 "televisions"
Solr mixed up "television" and "televisions"
我有一堆文档,每个文档中都有一堆随机单词。 television 和 televisions (Results for televisions)...i.e. when I search for televisions it gives me results for television and televisions altogether. It's only about the word television and its plural; Solr works fine for other words and their plurals. For example, it works fine for car and cars (Results for car) 的 Solr 输出混乱。可能是什么问题?
Solr 支持开箱即用的同义词,在 99.99% 的情况下,您必须定义哪些词是同义词。两个例外是单词 "television" 和 "gigabyte",因为它们已经在 Solr 使用的默认 synonyms.txt
文件中定义。
您可以在核心的 conf
文件夹中看到:
$ cat /path/to/solr/server/solr/your-core/conf/synonyms.txt
# Some synonym groups specific to this example
GB,gib,gigabyte,gigabytes
MB,mib,megabyte,megabytes
Television, Televisions, TV, TVs
注意它如何定义 TV、Television、Televisions 和 TVs 是同义词。
您也可以在这里阅读更多相关信息:
https://github.com/hectorcorrea/solr-for-newbies/blob/master/tutorial.md#synonyms
我有一堆文档,每个文档中都有一堆随机单词。 television 和 televisions (Results for televisions)...i.e. when I search for televisions it gives me results for television and televisions altogether. It's only about the word television and its plural; Solr works fine for other words and their plurals. For example, it works fine for car and cars (Results for car) 的 Solr 输出混乱。可能是什么问题?
Solr 支持开箱即用的同义词,在 99.99% 的情况下,您必须定义哪些词是同义词。两个例外是单词 "television" 和 "gigabyte",因为它们已经在 Solr 使用的默认 synonyms.txt
文件中定义。
您可以在核心的 conf
文件夹中看到:
$ cat /path/to/solr/server/solr/your-core/conf/synonyms.txt
# Some synonym groups specific to this example
GB,gib,gigabyte,gigabytes
MB,mib,megabyte,megabytes
Television, Televisions, TV, TVs
注意它如何定义 TV、Television、Televisions 和 TVs 是同义词。
您也可以在这里阅读更多相关信息: https://github.com/hectorcorrea/solr-for-newbies/blob/master/tutorial.md#synonyms