How about using a FuzzyQuery and using a Rewrite subclass to collect terms? 
This works with all MultiTermQuery subclasses. 

Basically you set a custom rewrite (I think you want ScoringRewrite) that 
collects the terms and rewrite to nothing (e.g. MatchNoDocsQuery). You just 
rewrite the MultiTermQuery and ignore the results.

Uwe

Uwe

Am June 7, 2020 8:15:48 PM UTC schrieb Matt Davis <[email protected]>:
>I am trying to upgrade my project to Lucene 8.5 from 8.4 and have hit a
>snag.  I had been using
>the FuzzyTermEnum constructor:
>FuzzyTermsEnum(Terms terms, AttributeSource atts, Term term, int
>maxEdits,
>int prefixLength, boolean transpositions) throws IOException
>This constructor is no longer public. I have been sharing
>an AttributeSource with MaxNonCompetitiveBoostAttribute set and no
>longer
>see a way to do that.  You can see my usage below:
>https://github.com/zuliaio/zuliasearch/blob/master/zulia-server/src/main/java/io/zulia/server/index/ShardTermsHandler.java#L108
>
>What is the new way to handle this?
>
>Thanks,
>Matt

--
Uwe Schindler
Achterdiek 19, 28357 Bremen
https://www.thetaphi.de

Reply via email to