lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: combining MultiFieldQueryParserparser with FuzzyQuery
Date Tue, 19 Oct 2010 08:22:21 GMT
I don't think you can do that directly with MultiFieldQueryParser, but
as Erick said in a similar thread a short while ago "You can create
your own BooleanQuery and just add clauses as you need to".

FuzzyQuery fq1 = new FuzzyQuery(whatever ...);
FuzzyQuery fq2 = new FuzzyQuery(whatever-else ...);
...
BooleanQuery bq = new BooleanQuery();
bq.add(fq1, ...);
bq.add(fq2, ...);
...


--
Ian.


On Tue, Oct 19, 2010 at 12:46 AM, Andy Yang <andy@stitcher.com> wrote:
> I would like to use MultiFieldQueryParser to serach multiple fields, then in
> each field, I want to use fuzzy search. How can that be done? Any example
> will be appreciated.
>
> Thanks,
> Andy
>

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