lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Phonetic search with Lucene 3.2
Date Tue, 08 Nov 2011 14:19:58 GMT

On Nov 8, 2011, at 05:42 , Felipe Carvalho wrote:
>> Yes, quite possible, including boosting on exact matches if you want.  Use
>> a BooleanQuery to wrap clauses parsed once with phonetic analysis, and once
>> without, including fields at indexing time for both too of course.
> Would it be possible to point to an example where this is done. The best
> example of a BooleanQuery I've found so far is this one:
> But I couldn't find a boolean query using different analyzers for different
> fields of the attribute.

You could use two different QueryParser instances with different analyzers.  Or use the PerFieldAnalyzerWrapper,
though you'll still need to instances in order to have a different default field for each
expression.  But then use the techniques you saw in that article (or in Lucene in Action,
since you mentioned having that) to combine Query objects into a BooleanQuery.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message