开发者

Solr highlighting without stop-words for phrases?

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"

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 a开发者_如何学JAVAs expected? Or will i have to remove the stopwords filter in the 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" /> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜