Reputation: 83
I have an instance of Solr on my local machine and I am accessing it via the admin interface in my browser. The instance of Solr is working correctly for non-fuzzy searches (I use it everyday extensively).
One record in the database is myself with a forename field Barnaby and a surname field Dawson. Another record is Marcus Downing with the appropriate forename and surname fields. The capitalisations here are exactly as written. There are more than a dozen other people with the surname Downing in the database and similar numbers for the surname Dawson. There is another field IsHistorical which is set to false on all the records I am interested in.
Here are the searches I have performed with the rough number of matches (exact and inexact).
IsHistorical:false AND Surname:downing
Many matches of which many are exact.
IsHistorical:false AND Surname:dawson
Many matches of which most are exact.
IsHistorical:false AND Surname:downing~
Many matches none of which are exact.
IsHistorical:false AND Surname:dawson~
Many matches many of which are exact
IsHistorical:false AND Forename:barnaby AND Surname:dawson~
One match which is the correct result
IsHistorical:false AND Forename:marcus AND Surname:downing~
No matches at all
I have performed the last two searches with all combinations of first letter capitalisation on the surname and forename and observed no difference in the results. I have ensured that the number of rows returned by page is sufficiently large to see all the results returned. The queries are hand typed.
My question is: Why does the fuzzy search modifier stop me getting exact matches when searching for 'downing' but not when searching for 'dawson'?
My ultimate aim is to compose queries that match on multiple fields including forename and surname in a fuzzy manner.
Upvotes: 0
Views: 866
Reputation: 1018
My assumption is that you have stemming filter in the schema for the surname field, and the downing become to down.
Fuzzy on down gives you this kind of results. I think it is the best that you remove the stemming filter for this field.
Upvotes: 3