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 Use
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
do its job
more efficiently.
- Original Message
From: Helmut Jarausch <[EMAIL PROTECTED]>
To: java-user@lucene.apache.org
Sent: Thursday, 13 December, 2007 11:40:01 AM
Subject: Query.rewrite - help me to understand it
Hi,
since I need highlighting, I need to 'rewri
Hi,
since I need highlighting, I need to 'rewrite' a query.
Query.rewrite takes an object of type IndexReader
But what for?
As I understand it, rewrite transforms a possibly complicated
query into an simplified (internal?) form which is (unfortunately)
needed by QueryScorer which is in turn nee