Rob Young wrote:

Erik Hatcher wrote:


On 25 Oct 2005, at 07:35, Rob Young wrote:

Try setting the QueryParser.setFuzzyPrefixLength to 1.


That would be a great start. How would I implement that if I'm using FuzzyQuery rather than QueryParser?

Use the FuzzyQuery constructor that sets this value:

<http://lucene.apache.org/java/docs/api/org/apache/lucene/search/ FuzzyQuery.html#FuzzyQuery(org.apache.lucene.index.Term,%20float,% 20int)>

This requires the match to be on the begining of the field as a whole rather than terms within the field. I have a field called "all" which has title, artist for CDs title, director for DVDs, title, platform for Games so when I run the FuzzyQuery you suggest on this I get no results. Is there no way to say "the begining of the search term must match the begining of any of the terms in the searched field"?

In fact, even that doesn't hold true because I've checked and many of my "all" fields begin with the word kylie so surely klyie should match them?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to