Hello,
I am getting peculiar results when querying for a term containing hyphens
and add fuzzy search
<https://solr.apache.org/guide/6_6/the-standard-query-parser.html#TheStandardQueryParser-FuzzySearches>
.
I have indexed two items (1) "term-with-hyphens" and (2) "term with
hyphens". When I query ("q") for "term-with-hyphens" or "term with hyphens"
both items are returned as expected. The same is the case for escaped
hyphens "term\-with\-hyphens".
The problem: When I add the fuzzy search parameter (i.e.,
"term-with-hyphens~1" or "term\-with\-hyphens~1"). I get zero results back.
I struggle to understand the results, or how to solve this problem. My
intuition tells me that adding a fuzzy search parameter should surely
increase the size of the set of results. I am happy for any help on this!
Our current setup is using the "Extended DisMax Query Parser"
<https://solr.apache.org/guide/6_6/the-extended-dismax-query-parser.html>
however we observe the same behaviour using the "Standard Query Parser
<https://solr.apache.org/guide/6_6/the-standard-query-parser.html>". We are
using the "Standard Tokenizer
<https://solr.apache.org/guide/6_6/tokenizers.html#Tokenizers-StandardTokenizer>",
which splits at hyphens. Does this relate to this problem?
Thank you!
--
*Julian Hugo*
Working Student
Backend Development
(he/his)
[email protected]
D4L data4life gGmbH
Charlottenstraße 109
14467 Potsdam, Germany
www.data4life.care
Amtsgericht Potsdam, HRB 30667
Managing Director: Christian-Cornelius Weiß
We are Data4Life. We've been certified by the German Federal Office for
Information Security (BSI) in accordance with ISO 27001 on the basis of
"IT-Grundschutz".
Diversity is the driving force behind our work towards a society where
digital health improves quality of life for everyone.
Data4Life warmly welcomes applicants from the LGBTQI+ community, people
with a migration background, People of Color, and individuals with
disabilities or chronic illnesses to the team.
Climate neutral since 2019 <https://wtca.lfca.earth/e/data4life>