[Xapian-discuss] phrase search highlighting

Reini Urban rurban at x-ray.at
Thu Mar 10 12:36:40 GMT 2011


Hi
Some of my users are very "conservative" as it seems :)

The complained about "not finding anything useful", because the
highlighted sample
was wrongly colored when doing phrase search, e.g. "some word".
So they refused to use web search at all and keep telephoning around.

Not the found phrase was highlighted in one color, but all locations
of these words within the sample in different colors.
"This result is wrong" was their complaint when looking at the sample.

So I had to disable phrase highlighting at all like this:

query:
<!-- highlight only if Query does not contain PHRASE -->
$if{$eq{$substr{$query,0,1},"},$field{sample},$highlight{$field{sample},$terms}}$if{$field{sample},...}

(works only if the phrase is the first term, but that 99.9% the case)

If time permits please adjust omega highlighting for phrases. My time
is currently very limited unfortunately.
-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/



More information about the Xapian-discuss mailing list