On Dec 17, 2007, at 5:14 AM, qvall wrote:
So does it mean that if I my query doesn't support prefix or wild-char
queries then I don't need to use rewrite() for highlighting?
As long as the terms you want highlighted are extractable from the
Query instance, all is fine.
However, it wouldn't
So does it mean that if I my query doesn't support prefix or wild-char
queries then I don't need to use rewrite() for highlighting?
--
View this message in context:
http://www.nabble.com/Query.rewrite---help-me-to-understand-it-tp14314507p14370200.html
Sent from the Lucene - Java Users mailing l
On Thursday 13 December 2007 23:07:49 游泳池的鱼 wrote:
> hehe ,you can do a test with PrefixQuery rewrite method,and extract terms .
> like this
> query = prefixQuery.rewrite(reader);
> query.extractTerms(set);
> for(String term : set){
> System.out.println(term);
> }
>
> It will give you
hehe ,you can do a test with PrefixQuery rewrite method,and extract terms .
like this
query = prefixQuery.rewrite(reader);
query.extractTerms(set);
for(String term : set){
System.out.println(term);
}
It will give you a pleasant surprise.
2007/12/13, Helmut Jarausch <[EMAIL PROTECTED
rewrite turns
foo*
into
food foot football ...
etc. Those variant terms are found by looking in the index, hence the need for
the IndexReader.
Searcher calls rewrite on queries to do this - the highlighter just pre-empts
this conversion and sneaks a peek at the terms generated so it can