Class FuzzyTermOp

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class FuzzyTermOp
    extends PrefixTermOp
    A synonym class that uses leveinsten distance to match terms. Has a number of configuration options from the MatchOpQL parser:
    • fuzziness - The maximum Levenshtein Edit Distance threshold (integer), or AUTO, or AUTO.lowT.highT. Default is AUTO.3.6. See Elastic option reference.
    • prefix_length - The number of initial characters which must match to accept a term - See Elastic's fuzzy documentation
    • max_expansions - The maximum number of terms to accept into the synonym group - See Elastic's fuzzy documentation
    Since:
    5.0
    Author:
    Craig Macdonald
    See Also:
    Serialized Form
    • Constructor Detail

      • FuzzyTermOp

        public FuzzyTermOp​(java.lang.String searchString)
      • FuzzyTermOp

        public FuzzyTermOp​(java.lang.String searchString,
                           java.lang.Integer _prefix_length,
                           java.lang.Integer maxExpansions,
                           java.lang.Integer maxDist,
                           java.lang.Integer _lowT,
                           java.lang.Integer _highT)
    • Method Detail

      • getStartString

        protected java.lang.String getStartString​(java.lang.String search)
        Overrides:
        getStartString in class PrefixTermOp
      • getEndString

        protected java.lang.String getEndString​(java.lang.String termLo)
        Overrides:
        getEndString in class PrefixTermOp