SOLR fuzzy search not behaving as expected when analysers are used
Hello everyone, I am using the fuzzy search capability of SOLR 8.7 and I dug into a specific case in which the search misbehaves. I am using this analyzer (JSON here) on the field that I am using for search "analyzer" : { "filters":[ { "class":"solr.ASCIIFoldingFilterFactory", "preserveOriginal":"false" }, { "class":"solr.LowerCaseFilterFactory" }, { "class":"solr.PatternReplaceCharFilterFactory", "replacement":"", "pattern":"[^A-Za-z0-9]" } ], "tokenizer": { "class":"solr.KeywordTokenizerFactory" } } If the field has the value let's say abcdefghi It matches with a.b.c.d.e.f.g.i Because those dots inside are discarded due to the PatternReplaceCharFilterFactory. The problem I have is if instead of normal search I use the fuzzy search. The search term would look like this (with tilde 2 at the end, I am using distance of 2): a.b.c.d.e.f.g.i~2 This query never matches the original value without dots. Why is that? I anticipated that the filters are not applied when there is a fuzzy search query running, but the lowercase and the ASCIIFolding ones are working as intended.
Re: Solr fuzzy search with WordDemiliterFilter
The use of the fuzzy query operator will suppress the Word Delimiter Filter at query time. That's just the way it works. You can't use both fuzzy query and WDF when WDF is splitting apart words, numbers, and case changes, and throwing away special characters as well. To put it simply, at query time the user needs to close their eyes and imagine what transformations WDF is doing and then query based on that. One workaround: copy to a separate field that does not use WDF. Then the user can use fuzzy query fine (other than that it is limited to an editing distance of 2) for that other field. -- Jack Krupansky -Original Message- From: ilay raja Sent: Friday, March 29, 2013 10:28 AM To: solr-user@lucene.apache.org ; solr-...@lucene.apache.org Subject: Solr fuzzy search with WordDemiliterFilter Hi I need to apply fuzzy search for my production. It better the search results for spelling issue. However, it is not applying the analyzer filters configured in schema.xml I know fuzzy and wildcard search wont apply the filters. But is there a way to plugin the filters or write this logic at the client. Because am not getting any results for queries with numbers and special symbols(-). The configuration in schema.xml : How to make sure that the filters as per the indexing also applied on fuzzy search at the query time when the filters configured are not working. Please help.
Solr fuzzy search with WordDemiliterFilter
Hi I need to apply fuzzy search for my production. It better the search results for spelling issue. However, it is not applying the analyzer filters configured in schema.xml I know fuzzy and wildcard search wont apply the filters. But is there a way to plugin the filters or write this logic at the client. Because am not getting any results for queries with numbers and special symbols(-). The configuration in schema.xml : How to make sure that the filters as per the indexing also applied on fuzzy search at the query time when the filters configured are not working. Please help.
Re: Solr Fuzzy search on short string
Could your provide the precise query URLs. I don't quite follow the notation you are using, especially: car[x]~, [x]>"i". I mean, are you saying that q=cari~ does not match "carl"? (You left out the tilda in your message.) -- Jack Krupansky -Original Message- From: Jimmy Dean Sent: Tuesday, March 26, 2013 1:04 PM To: solr-user@lucene.apache.org Subject: Solr Fuzzy search on short string I did a fuzzy search on solr. The result is a little strange to me. Query "carj~" can match "carl". But "cari" can't match "carl". As a matter of fact, car[x]~, [x]>"i" can match "carl". Is this the correct behavior? Jimmey
Solr Fuzzy search on short string
I did a fuzzy search on solr. The result is a little strange to me. Query "carj~" can match "carl". But "cari" can't match "carl". As a matter of fact, car[x]~, [x]>"i" can match "carl". Is this the correct behavior? Jimmey
Re: Solr Fuzzy
tks moysidis On Thu, Oct 14, 2010 at 3:45 PM, Savvas-Andreas Moysidis < savvas.andreas.moysi...@googlemail.com> wrote: > Hi, > > yes, Solr does support fuzzy queries by using the Levenstein Distance > algorithm: > http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance > > You can specify a fuzzy query by adding a tilde (~) symbol at the end of > your query as in title: Solr~ > You can even specify a proximity threshold in order to achieve a less or > more strict fuzzy match as in title:Solr~0.8 with the threshold being a > number between 0 and 1, 1 being the most strict.. > > HTH > > On 14 October 2010 19:26, Claudio Devecchi wrote: > > > Hi people, > > > > Somebody knows if solr have the fuzzy funcionality? > > > > Tks > > > > -- > > Claudio Devecchi > > > -- Claudio Devecchi flickr.com/cdevecchi
Re: Solr Fuzzy
Hi, yes, Solr does support fuzzy queries by using the Levenstein Distance algorithm: http://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance You can specify a fuzzy query by adding a tilde (~) symbol at the end of your query as in title: Solr~ You can even specify a proximity threshold in order to achieve a less or more strict fuzzy match as in title:Solr~0.8 with the threshold being a number between 0 and 1, 1 being the most strict.. HTH On 14 October 2010 19:26, Claudio Devecchi wrote: > Hi people, > > Somebody knows if solr have the fuzzy funcionality? > > Tks > > -- > Claudio Devecchi >
Solr Fuzzy
Hi people, Somebody knows if solr have the fuzzy funcionality? Tks -- Claudio Devecchi