Class TextQueryDef

    • Constructor Detail

      • TextQueryDef

        protected TextQueryDef()
        Prevents direct instantiation.
    • Method Detail

      • thesaurus

        public TextQueryDef thesaurus​(java.lang.String thesName,
                                      java.lang.Double thesWeight)
        Sets the thesaurus information.
        Parameters:
        thesName - - name of the thesaurus to use, null if none. If empty string, null is assigned. If this matches a default thesaurus item name it is translated to the current name.
        thesWeight - penalty factor for thesaurus matches. If null must default to 1.0. The weight is used only if the thesaurus name is given.
        Throws:
        java.lang.IllegalArgumentException - if thesaurus_weight is given and it is not between 0.0 and 1.0.
      • getThesaurusName

        public java.util.Optional<java.lang.String> getThesaurusName()
        Returns:
        the thesaurus name, or empty Optional if no thesaurus is used. Never an empty string.
      • getThesaurusWeight

        public java.util.Optional<java.lang.Double> getThesaurusWeight()
        Returns:
        the thesaurus weight, or empty Optional if no weight is specified and the default 1.0 weight must be used.
      • matchEmpty

        public TextQueryDef matchEmpty​(java.lang.Boolean matchEmpty)
        Parameters:
        matchEmpty - the Match Empty Values property to set, or null to use the default (false).
      • isMatchEmpty

        public java.util.Optional<java.lang.Boolean> isMatchEmpty()
        Returns:
        the Match Empty Values property, or empty Optional if the default (false) is used.
      • emptyScore

        public TextQueryDef emptyScore​(java.lang.Double emptyScore)
        Parameters:
        emptyScore - the score to assign if the record or query data is empty, or null to use the default empty score.
        Throws:
        java.lang.IllegalArgumentException - the value is given and not between 0.0 and 1.0 or -1.0.
      • getEmptyScore

        public java.util.Optional<java.lang.Double> getEmptyScore()
        Returns:
        the empty score, or empty Optional if the default is used.
      • scoreType

        public TextQueryDef scoreType​(java.lang.Integer scoreType)
        Parameters:
        scoreType - the score type to set. Must be one of the score types defined in NetricsSearchOpts. If null defaults to SCORE_NORMAL.
      • getScoreType

        public java.util.Optional<java.lang.Integer> getScoreType()
        Returns:
        the score type, or empty Optional if the default is used.