Koji Sekiguchi wrote > > (12/01/24 9:31), O. Klein wrote: >> 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. > > Are you saying that using hl.q parameter on highlight field while using q > on > the search field that has StopFilter and hl.q doesn't work for you? > > koji > -- > http://www.rondhuit.com/en/ >
At first glance using hl.q did the trick. I just have problems when I am using terms with uppercase. Eventhough I use <filter class="solr.LowerCaseFilterFactory"/> on the highlighted field in both query and index I do get search results, but just no highlights (lowercasing the terms fixes the problem). Can someone confirm whether this is a bug? Thank you. -- View this message in context: http://lucene.472066.n3.nabble.com/Highlighting-stopwords-tp3681901p3734892.html Sent from the Solr - User mailing list archive at Nabble.com.