Not really examine issue more lucene issue but will ask just in case anyone knows the answer. When i do a standard search in my index for the word bank i get 288 docs and for top results get score values like:
03465
0.3241
0.3099
When i repeat the same search but this time using wildcard query eg bank* i get value of 1 for all the scores. This is the same for queries through examine and through luke in both instances i am using standard analyzer. I have done in the past wildcard queries with umbSearch which was using lucene 1.9 and score worked e.g http://www.akcros.com/sitetools/searchresults.aspx?search=lead am I missing a trick some where with examine which uses lucene 2.9?
There's something different that Lucene does do with scoring when you're using wildcards, I remember it being mentioned in the Lucene in Action book, but I can't remember rightly what it is.
You should still be getting numerical differences for the results though, that's for sure. I'd check the Lucene docs
Quick dirty hack i know for all our sites we will be using wildcard searches so i updated source in class LuceneSearchCriteria
this.queryParser = new MultiFieldQueryParser(luceneVersion, fields, analyzer);
this.queryParser.SetAllowLeadingWildcard(allowLeadingWildcards);
queryParser.SetMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE); //my line here
Does the trick not sure what it would do with non wildcard query might give it a whirl see what it does to scoring.
Examine wildcard search score
Not really examine issue more lucene issue but will ask just in case anyone knows the answer. When i do a standard search in my index for the word bank i get 288 docs and for top results get score values like:
03465
0.3241
0.3099
When i repeat the same search but this time using wildcard query eg bank* i get value of 1 for all the scores. This is the same for queries through examine and through luke in both instances i am using standard analyzer. I have done in the past wildcard queries with umbSearch which was using lucene 1.9 and score worked e.g http://www.akcros.com/sitetools/searchresults.aspx?search=lead am I missing a trick some where with examine which uses lucene 2.9?
Regards
Ismail
There's something different that Lucene does do with scoring when you're using wildcards, I remember it being mentioned in the Lucene in Action book, but I can't remember rightly what it is.
You should still be getting numerical differences for the results though, that's for sure. I'd check the Lucene docs
Slace,
Found this post http://www.gossamer-threads.com/lists/lucene/java-user/92194 basically the solution they are recommending is
You need to change multiTermRewriteMethod of QueryParser.
qp.setMultiTermRewriteMethod(MultiTermQuery.SCORING_BOOLEAN_QUERY_REWRITE);
I guess thats something in the bowels of umbraco examine that would need changing?
Regards
Ismail
Yeah that's not even close to being exposed :P
You'd have to modify the way the fluent API is generating the query
Slace,
Quick dirty hack i know for all our sites we will be using wildcard searches so i updated source in class LuceneSearchCriteria
Does the trick not sure what it would do with non wildcard query might give it a whirl see what it does to scoring.
Regards
Ismail
is working on a reply...