lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mark harwood <markharw...@yahoo.co.uk>
Subject Re: Query.rewrite - help me to understand it
Date Thu, 13 Dec 2007 12:00:31 GMT
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 do its job more efficiently.



----- Original Message ----
From: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
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 '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 need by Highlighter.

What does Query.rewrite do and why does it need access to the
index?

Many thanks for an explanation,
Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

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






      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


---------------------------------------------------------------------
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