Solr高亮显示短语没有停用词? [英] Solr highlighting without stop-words for phrases?

查看:87
本文介绍了Solr高亮显示短语没有停用词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图在Solr中突出显示结果,直到现在,在这里和那里进行调整都是很困难的工作...我现在主要担心的是我使突出显示的短语起作用了,但是如果我搜索类似的东西 巴西世界杯:意料之外的挑战"

I am trying to highlight results in Solr and up until now, it's been a struggle of tweaking here and there... My main concern now is that i got the highlighting phrases thing working, but if i search for something like "The World Cup At Brazil: An Unexpected Challenge"

突出显示字段将返回: 巴西世界杯:意料之外的挑战"

The highlighting field will return: "World Cup Brazil: Unexpected Challenge"

我认为这可能是由于停用词所致(我的字段是'textgen'类型,顺便说一句).查询中是否有某种参数要运行,该参数将按预期返回突出显示的整个字段?还是我必须删除textgen中的停用词过滤器?

I think this might be due to the stop words (my field is a 'textgen' type, btw). Is there some kind of parameter to run in the query that would return the entire field highlighted as expected? Or will i have to remove the stopwords filter in the textgen?

推荐答案

这肯定是由于停用词所致.考虑声明一个新的字段类型,例如textgen,但在索引或查询分析器中不包含以下内容:

This is definitely due to stopwords. Consider declaring a new fieldtype like textgen, but without the following in it's index or query analyzers:

    <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> 

这篇关于Solr高亮显示短语没有停用词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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