Class NetricsSearchResult

    • Method Detail

      • getCharMatchStrengths

        public int[] getCharMatchStrengths​(java.lang.String fieldName)
                                    throws NetricsException
        Returns the match strength information for a searchable-text field in the record.

        The core search algorithm creates match strengths for each character in a matching record. These strengths are represented as an integer where 0 indicates no match and higher numbers represent a better match.

        Parameters:
        fieldName - The name of the field for which to return its match strength information.
        Returns:
        An integer array with one value in the array for each character in the given field, or null if called for a field that is not searchable text.
        Throws:
        NetricsException - if the field name is invalid.
      • getCharMatchStrengths

        public int[] getCharMatchStrengths​(int fieldNo)
        Returns the match strength information for a searchable-text field in the record.

        Parameters:
        fieldNo - The number of the field for which to return its match strength information.
        Returns:
        An integer array with one value in the array for each character in the given field, or null if called for a field that is not searchable text.
      • getDblCharMatchStrengths

        public double[] getDblCharMatchStrengths​(java.lang.String fieldName)
                                          throws NetricsException
        Returns the precomputed visualization strengths for a searchable-text field.

        These are per character match quality score values where 0.0 represents no match and 1.0 represents a perfect match. These scores account for more factors than the integer match scores and are the preferred character strength scores to use.

        Parameters:
        fieldName - The name of the field for which to return its match strength information.
        Returns:
        An double array with one value in the array for each character in the given field, or null if called for a field that is not searchable text. Values are between 0.0 and 1.0.
        Throws:
        NetricsException - if the field name is not in the results.
      • getDblCharMatchStrengths

        public double[] getDblCharMatchStrengths​(int fieldNo)
        Returns the precomputed visualization strengths for a searchable-text field.

        These are per character match quality score values where 0.0 represents no match and 1.0 represents a perfect match. These scores account for more factors than the integer match scores and are the preferred character strength scores to use.

        Parameters:
        fieldNo - The number of the field for which to return its match strength information.
        Returns:
        An double array with one value in the array for each character in the given field, or null if called for a field that is not searchable text. Values are between 0.0 and 1.0.
      • getHtml

        public java.lang.String getHtml​(java.lang.String fieldName)
                                 throws NetricsException
        Gets an HTML visualized field from the record.

        Gets the content of a given field with matching characters visualized using HTML. Parameters for the visualization can be set in the NetricsSearchOpts object.

        Parameters:
        fieldName - The name of the field for which to get the HTML visualized string.
        Returns:
        visualization results as an HTML string.
        Throws:
        NetricsException - if the field name is not in the results.
        See Also:
        NetricsSearchOpts
      • getHtml

        public java.lang.String getHtml​(int fieldNo)
        Gets an HTML visualized field from the record.

        Gets the content of a given field with matching characters visualized using HTML. Parameters for the visualization can be set in the NetricsSearchOpts object.

        Parameters:
        fieldNo - The index of the field for which to get the HTML visualized string.
        Returns:
        visualization results as an HTML string.
        See Also:
        NetricsSearchOpts
      • getMatchScore

        public double getMatchScore()
        The score that was used to sort the record. This is the same as one of the explicit score types (default is NORMAL). See the scoreType method in NetricsQuery for a description of the possible score types.
        Returns:
        the score that was used to sort the record.
        See Also:
        NetricsQuery.scoreType(int)
      • getNormMatchScore

        public double getNormMatchScore()
        A score from 0 to 1.0 indicating the normal match strength for this record.
        Returns:
        the normal match strength for this record.
        See Also:
        NetricsQuery.scoreType(int)
      • getRevMatchScore

        public double getRevMatchScore()
        A score from 0 to 1.0 indicating the reverse match strength for this record.
        Returns:
        the reverse match strength for this record.
        See Also:
        NetricsQuery.scoreType(int)
      • getSymMatchScore

        public double getSymMatchScore()
        A score from 0 to 1.0 indicating the symmetric match strength for this record.
        Returns:
        the symmetric match strength for this record.
        See Also:
        NetricsQuery.scoreType(int)
      • getMinMatchScore

        public double getMinMatchScore()
        A score from 0 to 1.0 indicating the minimum of the normal and reverse match strengths for this record.
        Returns:
        the minimum of the normal and reverse match strengths for this record.
        See Also:
        NetricsQuery.scoreType(int)
      • getMaxMatchScore

        public double getMaxMatchScore()
        A score from 0 to 1.0 indicating the maximum of the normal and reverse match strengths for this record.
        Returns:
        the maximum of the normal and reverse match strengths for this record.
        See Also:
        NetricsQuery.scoreType(int)
      • getRlScore

        @Deprecated
        public double getRlScore()
        Deprecated.
        use getMatchScore() to get the Learn model score for RLink queries.
        Returns the Learn model score for this record (from 0 to 1.0).
        Returns:
        the Learn model score for this record.
      • getITMatchScore

        public double getITMatchScore()
        A score from 0 to 1.0 indicating the information theoretic score for this record. Contact your support representative if you're interested in learning how IT scores are computed.
        Returns:
        the information theoretic score for this record.
      • getMatchScoreQlt

        public double[] getMatchScoreQlt()
        Querylet match scores.

        If the top level query is a score combiner these are the match scores of the individual querylets of the score combiner. E.g. if you have a simple query for each field in the record combined with an AND these would be the scores of the simple queries, and thus the scores for the individual fields.

        Returns:
        An array of match scores for the querylets, or null if the top level query is not a score combiner.
        See Also:
        NetricsQuery.scoreType(int)
      • getNormMatchScoreQlt

        public double[] getNormMatchScoreQlt()
        The per-querylet normal match scores.
        Returns:
        the per-querylet normal match scores, or null if result does not contain such scores.
        See Also:
        NetricsQuery.scoreType(int)
      • getRevMatchScoreQlt

        public double[] getRevMatchScoreQlt()
        The per-querylet reverse match scores.
        Returns:
        the per-querylet reverse match scores, or null if result does not contain such scores.
        See Also:
        NetricsQuery.scoreType(int)
      • getSymMatchScoreQlt

        public double[] getSymMatchScoreQlt()
        The per-querylet symmetric match scores.
        Returns:
        the per-querylet symmetric match scores, or null if result does not contain such scores.
        See Also:
        NetricsQuery.scoreType(int)
      • getITMatchScoreQlt

        public double[] getITMatchScoreQlt()
        The per-querylet IT match scores.
        Returns:
        the per-querylet IT match scores, or null if result does not contain such scores.
        See Also:
        NetricsQuery.scoreType(int)
      • getRlSignificances

        public double[] getRlSignificances()
        Get the Learn Model (RLINK) significance values.

        This returns the significance array for RLINK queries. If the top level query was not an RLINK query null is returned. If this result does not represent what the Learn Model considers a match, null is returned.

        There is one significance value for each querylet input to the RLINK query. Note this is not per record field, it is per input querylet. Each entry is a value between 0.0 and 1.0. The value defines the relative importance of each querylet in determining this was a match. Querylets with high significance scores were considered relevant in making the decision, querylets with low scores were not relevant. The scores are proportional values and not based on an absolute scale.

        Returns:
        The significance array, or null if this result is not from an RLINK query.
      • getRlConfidence

        public double getRlConfidence()
        Get the Learn Model (RLINK) confidence measure.

        Only Rlink queries produce a confidence value other than 1.0. However confidence values are passed up, so score combiners may return a confidence value from a lower level Rlink query.

        The calculation of a confidence measure by an Rlink query can be turned off. When confidence calculation is turned off the special value: -999.0 is produced.

        The confidence measure is a value between 0.0 and 1.0. It gives an estimate of how confident the model is in the prediction it made. This is based primarily on how well trained the model is for the this particular match case. A value of 0.0 indicates no confidence at all in the prediction, i.e. the model was not trained in this case or the training was very contradictory, so the model is only estimating the score. A value of 1.0 means complete confidence. The dividing line between good confidence values and bad ones depends on the application and the confidence measure used.

        Returns:
        The confidence value, or -999.0 if no confidence was available.
      • getNamedQlts

        public java.lang.String[] getNamedQlts()
        Get the list of named querylets, null if none.
        Returns:
        the list of named querylets.
      • getNamedQltScoresArray

        public double[] getNamedQltScoresArray()
        Get the list of named querylet scores, null if none.
        Returns:
        the list of named querylet scores.
      • getNamedQltScore

        public double getNamedQltScore​(java.lang.String qlet_name)
                                throws NetricsException
        Get the match score of the named querylet.
        Parameters:
        qlet_name - the name of the querylet.
        Returns:
        the match score of the named querylet.
        Throws:
        NetricsException - if qlet_name is null or there is no querylet with the given name.
      • getNamedQltConfidenceArray

        public double[] getNamedQltConfidenceArray()
        Get the list of named querylet confidence measures, null if none.
        Returns:
        the list of named querylet confidence measures.
      • getNamedQltConfidence

        public double getNamedQltConfidence​(java.lang.String qlet_name)
                                     throws NetricsException
        Get the confidence measure of the named querylet.
        Parameters:
        qlet_name - the name of the querylet.
        Returns:
        the confidence measure of the named querylet.
        Throws:
        NetricsException - if qlet_name is null or there is no querylet with the given name.
      • getSrcTblName

        public java.lang.String getSrcTblName()
        The name of the table from which the record came. This is useful for multi-table searches.
        Returns:
        name of the table from which the record came.
      • getSrcDbName

        @Deprecated
        public java.lang.String getSrcDbName()
        Deprecated.
        Returns:
        name of the table from which the record came.
      • getSrcTblInfo

        public java.lang.String getSrcTblInfo()
        The table info field for the table from which the record came. Will be null if tblinfo was not set at loadtime.
        Returns:
        the table info field for the table from which the record came.
      • getSrcDbInfo

        @Deprecated
        public java.lang.String getSrcDbInfo()
        Deprecated.
        Returns:
        table info field for the table from which the record came.
      • getMatchType

        public java.lang.String getMatchType()
        The type of search which retrieved this record.
        Returns:
        "date" if custom date search was used, "typographic" otherwise.
      • getMatchRank

        public int getMatchRank()
        The ordinal ranking of this record.
        Returns:
        An integer ranking which will be between the requested start match and the start match plus the number requested.
      • getDirtyState

        public boolean getDirtyState()
        The dirty state for this record. This returns true if this record is in a dirty state. A dirty record is one that has been modified by a transaction that is still open, i.e. not yet committed or aborted. As the transaction is incomplete the dirty record may represent an intermediate state or it may get removed or rolled back if the transaction is aborted. The user may wish to ignore dirty records.
        Returns:
        the dirty state for this record.