Thanks - I tried it out and it seems to work for "Philadelphid~0.75 PA" but I can't get it working for "Phil* PA" yet. Perhaps it is an issue with my Analyzer (I am using WhitespaceAnalyzer)?. Have you used it with wildcard before?
-Jeff -----Original Message----- From: AHMET ARSLAN [mailto:iori...@yahoo.com] Sent: Wednesday, November 11, 2009 5:55 PM To: java-user@lucene.apache.org Subject: Re: Edit distance and wildcard searching with PhraseQuery What you are looking for is ComplexPhraseQueryParser [1] and implemented in Lucene 2.9.0. It uses SpanQuery family. It supports "Phil* PA"~10 as well as "Philadelphid~0.75 PA". Ranges, OR, fuzzy and wildcard inside proximity (phrases). [1] http://lucene.apache.org/java/2_9_0/api/contrib-misc/org/apache/lucene/queryParser/complexPhrase/package-summary.html [2] https://issues.apache.org/jira/browse/LUCENE-1486 > I am trying to figure out a way that I can query a Lucene > index for a > phrase but have some fuzziness (edit distance and/or > wildcard) applied > to the individual terms. An example should help > explain what I am > trying to do: > > > > Index contains: > > Philadelphia PA > > > > Search is done on: > > Philadelphid PA > > > > I want it to result in a hit - basically something like > "Philadelphid~0.75 PA" (that syntax is not valid but > explains what I am > looking for). Similarly, I would like to be able to > do something like > "Phil* PA" and get a hit as well. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org