lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S Eslamian <seslam...@gmail.com>
Subject Re: use QueryTermExtractor for RangeQueries
Date Thu, 15 Sep 2011 04:02:43 GMT
I have an instance of IndexSearcher and then call rewrite method with the
query.
IndexRear ir = IndexReader.open("directory path",true);
IndexSearcher indexSearcher = new IndexSearcher(ir);
indexSearcher.rewrite(query);


On Wed, Sep 14, 2011 at 10:03 PM, Simon Willnauer <
simon.willnauer@googlemail.com> wrote:

> how do you rewrite your query?
>
> simon
>
> On Tue, Sep 13, 2011 at 9:22 AM, S Eslamian <seslamian@gmail.com> wrote:
> > Hi
> > I am using QueryTermExtractor.getTerms for finding the terms of a given
> > query in lucene 3.0.3. In it's document has said that "Utility class used
> to
> > extract the terms used in a query, plus any weights. This class will not
> > find terms for MultiTermQuery, RangeQuery and PrefixQuery classes so the
> > caller must pass a rewritten query (see Query.rewrite) to obtain a list
> of
> > expanded terms.", but for these queries - MultiTermQuery, RangeQuery and
> > PrefixQuery - even rewritten query, it doesn't return the correct list of
> > expanded terms.
> > What should I do? For example for e PrefixQuery like 'hell*' it returns
> > 'hell*' instead of " 'hell' and 'hello' and ... ";
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message