lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wulf Berschin <bersc...@dosco.de>
Subject Highlight Wildcard Queries
Date Tue, 25 Jan 2011 17:40:24 GMT
Hi,

I'm just migrating our small search customization from Lucene version 
2.3 to the current version (3.0.3) and wonder why, in contrast to the 
old version, we no longer get the Wildcard Queries (which are default, 
since surround the search string with asterisks) highlighted.

We're using the "traditional" Highlighter and don't store documents 
content (in total about 100MB) in the index.

As far I understand in the earlier version a WildCard Query was 
rewritten (expanded) into many Term Queries before highlighting (but in 
practice never exceeded the maximum clauses size since we only wrapped 
strings longer than 3 characters...)

Now however, QueryParser returns a BooleanQuery conataining a 
ConstantScoreQuery which has an enmpty extractTerms method and thus 
doesnt contribute terms for the highlighter.

What do I have to do to get the wildcard query results highlighted?
Use th old Rewrite methods (if possible)??
Go back to Lucene 2.3???

Wulf


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message