lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Naber <>
Subject Phrase queries with wildcards
Date Sun, 03 Dec 2006 23:08:31 GMT

Lucene's phrase queries don't support wildcards and I'm thinking about the 
best way to "fix" this. One way would be to change QueryParser so that it 
builds a MultiPhraseQuery when it encounters a wildcard inside a phrase. 
However, to expand the wildcard the QueryParser needs an IndexReader.

The other way might be to add a rewrite to PhraseQuery that returns a 
MultiPhraseQuery with the terms expanded. QueryParser would need to be 
modified so that the "*" isn't already lost when it's added to the phrase 

The second solution looks better to me. Has anybody solved this problem 
already and would like to share his experiences?



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

View raw message