Highlighting the search terms is not working when wildcards are used
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rossen_angelov
Posted On:   Thursday, April 14, 2005 08:58 AM

Hi,


We are experiencing a strange problem when wildcards like * and ? are used in the search terms and the results have to be highlighted - the string for the corresponding field is returned empty.


If the highlighter code is removed the results are returned correctly.


Is there a known problem with the highlighter and using wildcards?


Thanks,
Ross

Re: Highlighting the search terms is not working when wildcards are used

Posted By:   rossen_angelov  
Posted On:   Thursday, April 14, 2005 01:15 PM

I actually found the answer in the Lucene book. It is in chapter 8.7


The Query.rewrite(IndexReader) method has to be called before passing the Query to the Scorer. This rewrites the queries with wildcards to BooleanQuery of all the matching terms.


Then, everything works fine ...


Ross

About | Sitemap | Contact