lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jami Kapla <>
Subject Help Regarding Fuzzy Scoring
Date Thu, 09 Aug 2007 20:08:41 GMT

I have been using Lucene recently (newbie) and reading about scoring.
However, have a result that of course still does not make sense to me.

I have an index created from a single field (entree) in one table in  
my DB.
I Index it with the StandardAnalyzer.

I also Query it with the StandardAnalyzer as simple as possible like:

             QueryParser qp = new QueryParser("title", new  
    query = qp.parse( qStr );
             hits = query );

Here is the possible responses that I know are in the index.

Lemon chicken
Chicken parmesan
Chicken marsala
Chicken cordon blue
Chicken and dumplings
Bbq chicken
Garlic chicken
Teriyaki chicken
Chlcken picatta

If qStr="Chicken" thus basic TermQuery it works as expected and  
returns the result:

Chicken  			score=0.99999994   (sort of thought this would be 1.0 but  
at least it found and scored the right one)
Lemon chicken 		score=0.625Chicken parmesan	score=0.625
.... so on

However, if I make it a Fuzzy search by setting qStr="Chicken~" the  
results I get are

Chlcken picatta		score=1.0
Chicken 			score=0.4026232
Lemon chicken		score=0.2516395
Chicken parmesan	score=0.2516395 on

Most likely this is a lack of my understanding of the fundamentals  
but I would think
it should come up with Chicken as the highest score still considering  
it is an exact match.

Any clue as to why this is is greatly appreciated.

Meanwhile I am still reading docs and searching the web.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message