lucene-java-user mailing list archives

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

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

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

Regards
 Daniel

-- 
http://www.danielnaber.de

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