Open vladak opened 5 years ago
Yes, but if you look at the actual implementation in Lucene, then you will notice they use it there still as well. I took it from there :D so I was not sure if there was an equivalent.
I will just suppress the warning for #2246 however the suggestion to use integer distances needs to be investigated.
From Lucene 7.4.0 :
protected Query newFuzzyQuery(Term term, float minimumSimilarity, int prefixLength) {
String text = term.text();
int numEdits = FuzzyQuery.floatToEdits(minimumSimilarity, text.codePointCount(0, text.length()));
return new FuzzyQuery(term, numEdits, prefixLength);
}
Yeah, just reached similar code on http://demo.opengrok.org/xref/lucene-solr/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserBase.java?r=10b7be59#594 :-) Given the Lucene itself will have to deal with this maybe we can just wait for them.
javac
gives this warning when compiling the suggester code inopengrok-web
module:The Lucene javadoc https://lucene.apache.org/core/6_6_1/core/org/apache/lucene/search/FuzzyQuery.html says: