如何在solr中使用前缀索引单词? [英] how index words with their prefix in solr?

查看:119
本文介绍了如何在solr中使用前缀索引单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用solr 3.3来索引我的文件,我想要solr索引单词的后缀,例如我想索引彩色的颜色,当我搜索颜色solr时显示任何颜色丰富的文档。

I use solr 3.3 to index my files, I want solr index words with their suffixes for example I want to index colorful like color and when i search color solr show any document that has colorful.

推荐答案

您需要在该字段上应用分析。

You would need to apply analysis on the field.

词干 - 它是一种字典。这将减少索引和搜索到其根源的单词。

例如如果搜索到任何单词,颜色,颜色,彩色将匹配您的搜索。

Stemming - Its a kind of dictionary. This would reduce the word indexed and searched to its roots.
e.g. color, colors, colored would match your searches, if any word is searched.

有些情况下,上述词干不起作用。

您可以使用 SynonymFilter ,这样您就可以指定您称为同义词的单词匹配搜索结果。

There was would be cases where the above stemming does not work.
You can use SynonymFilter, This allows you to specify words which you term as synonym and would match the search results.

这篇关于如何在solr中使用前缀索引单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆