[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-dev
Subject:    Re: Accessibility of QueryParserBase::handleBareFuzzy
From:       Chris Hegarty <christopher.hegarty () elastic ! co ! INVALID>
Date:       2021-09-21 11:07:35
Message-ID: C72E80C2-EB12-4027-9455-87EC141A1361 () elastic ! co
[Download RAW message or body]

Thanks Alan, great suggestion.

I filed the following issue to track this:
   https://issues.apache.org/jira/browse/LUCENE-10115

-Chris.

> On 20 Sep 2021, at 16:14, Alan Woodward <romseygeek@gmail.com> wrote:
> 
> Hi Chris,
> 
> The difference between the elasticsearch query parser and the built-in lucene one \
> appears to be based around how they parse fuzziness, so I think the best solution \
> here is to add another protected method, something like this: 
> protected float parseFuzzyDistance(String input, float default) {
> 	try {
> 		return Float.parseFloat(fuzzySlop.image.substring(1));
> 	} catch (@SuppressWarnings("unused") Exception ignored) {
> 		return default;
> 	}
> }
> 
> Then handleBareFuzzy() can call out to this, and the ES version can overload it and \
> do its own parsing. 
> - A

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic