简体   繁体   English

SOLR和词干

[英]SOLR and stemming

Is there an easy way to simply exclude certain words from stemming in solr? 是否有一种简单的方法可以简单地从solr中排除某些单词? We have a database full of food items and everytime we search for things like "fried shrimp" it will bring back results like "boiled shrimp served with fries" 我们有一个装满食品的数据库,每当我们搜索“炸虾”之类的东西时,它会带回“煮熟的虾配炸薯条”之类的结果

For nearly 98% of our search the stemming in all other instances work fine and we want to keep stemming in place. 对于近98%的搜索,在所有其他实例中的词干工作正常,我们希望保持原样。

We just need to omit certain words from the stemming process like "fries" and "fried" so they are unique and not variations of each other. 我们只需要省略词干过程中的某些词语,如“薯条”和“油炸”,这样它们就是独特的而不是彼此的变化。 So that when we search for "fries" it picks up just "fries" but not "fried catfish" or anything with the word fried in it. 因此,当我们搜索“薯条”时,它只会选择“薯条”而不是“油炸鲶鱼”或任何带有油炸词的东西。

Thanks! 谢谢!

The solr.KeywordMarkerFilterFactory should protect words from being stemmed. solr.KeywordMarkerFilterFactory应该保护单词不被阻止。 See this page regarding the SnowballPorterStemmer. 有关SnowballPorterStemmer的信息,请参阅此页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM