Koji Sekiguchi wrote
> 
> (12/02/11 21:19), O. Klein wrote:
>>
>> 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?
> 
> I don't see your situation. Giving us concrete examples (especially
> request parameters
> including q and hl.q) would help a lot!
> 
> koji
> -- 
> http://www.rondhuit.com/en/
> 

I got it fixed now I think.

I thought that if you used it like "hl.q=spell Checker" it would use the
query analysis of the field that was being highlighted as default. But in my
case it needs to be "hl.q=content_hl:(spell Checker)" for it to work. The
behavour I got default made no sense whatsoever.

Could you be so kind to explain a bit more how hl.q is supposed to work and
with some examples?

Thanx.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Highlighting-stopwords-tp3681901p3740114.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to