On 20-May-08, at 12:31 AM, Tim Mahy wrote:
Hi all,
we have situation in which we have documents
that have an introduction (text) , a body (text) and some meta data
fields (integers mostly).
when we create a query like this :
q=( +(body_nl:( brussel) ) AND ( (+publicationid:("3430" OR
"3451")) )&fq= +publishdateAsString:[20070520 TO
20080520
]&start
=
0
&rows
=
11
&hl
=
on
&hl
.fl
=
body_nl
&hl
.snippets=3&hl.fragsize=320&hl.simple.pre=<strong>&hl.simple.post=</
strong>&sort=publishdateAsString desc,publicationname
desc&fl=id,score,introduction
we get nice highlighting from the body_nl field but Solr also
highlights 3430 and 3451 if there is such a "word" in the body_nl,
while we were expecting only to get highlighting from the word
"brussel" in the body_nl.
So it seems that all posible criteria terms are highlighted in any
of the given highlighting fields. Is it possible to disable this
(with some kind of parameter of something) and only let the hl.fl's
highlight the criteria for their own field ?
see http://wiki.apache.org/solr/HighlightingParameters
You can also avoid this by making the publication id restriction
clause a filter (fq param).
regards,
-Mike