-Re: Highlighting stopwords
O. Klein 2012-01-24, 00:31
Koji Sekiguchi wrote
> (12/01/23 23:14), O. Klein wrote:
>> Im using trunk and FVH and eventhough I filter stopwords when searching,
>> would like to highlight stopwords in fragments. Using a different field
>> without the stopwords filter did not have the desired effect.
> Please provide more info. In particular, how your query look like, the
> expected results,
> actual results and the filter definition in schema.xml.
> Thank you,
Let's say I search for "spellcheck solr" on a website that only contains
info about Solr, so "solr" was added to the stopwords.txt. The query that
will be parsed then (dismax) will not contain the term "solr".
So fragments won't contain highlights of the term "solr". So when a fragment
with the highlighted term "spellcheck" is generated, it would be less
confusing for people who don't know how search engines work to also
highlight the term "solr".
So my first test was to have a field with StopFilterFactory and search on
that field, while using another field without StopFilterFactory to highlight
on. This didn't do the trick.
So thinking about it some more, I think some terms don't need to be
highlighted (e.g. "the") and some need to be highlighted, but don't need to
affect the scoring of a document (e.g. "solr") and others need to be
highlighted and affect scoring (e.g. "spellcheck").
What are your thoughts on this?
View this message in context: http://lucene.472066.n3.nabble.com/Highlighting-stopwords-tp3681901p3683452.html
Sent from the Solr - User mailing list archive at Nabble.com.