Class MatchingQueryTerms.QueryTermProperties

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

    public static class MatchingQueryTerms.QueryTermProperties
    extends java.lang.Object
    implements java.io.Serializable, java.lang.Cloneable
    The weight and the modifiers associated with a query term.
    See Also:
    Serialized Form
    • Field Detail

      • required

        public java.lang.Boolean required
      • weight

        public double weight
        The weight of a query term. This is usually how many times the term occurred in the query, but sometime may be altered if a weight has been specified on the query term: eg QueryExpansion will do this, as will manually specifying a weight on the unparsed query (example term1 term2^3).
      • termModels

        public java.util.List<WeightingModel> termModels
        The term score modifiers associated with a particular query term.
      • tags

        public java.util.Set<java.lang.String> tags
    • Constructor Detail

      • QueryTermProperties

        public QueryTermProperties​(int _index)
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   EntryStatistics _stats)
        An constructor for setting the term code of a query term.
        Parameters:
        _stats - the statistics of the query term
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   double w)
        A constructor for setting the weight of a term.
        Parameters:
        w - double the weight of a query term.
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   WeightingModel model)
        A constructor for setting a term score modifier for a term.
        Parameters:
        model - WeightingModel modifier associated with a query term.
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   double w,
                                   WeightingModel model)
        A constructor for setting the weight and a term score modifier for a term.
        Parameters:
        w - double the weight of a query term.
        model - WeightingModel modifier associated with a query term.
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   double w,
                                   EntryStatistics _stats)
        A constructor for setting the weight of a term and its term code.
        Parameters:
        w - double the weight of a query term.
        _stats - statistics of the query term
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   WeightingModel model,
                                   EntryStatistics _stats)
        A constructor for setting a term score modifier for a term and its term code.
        Parameters:
        model - WeightingModel modifier associated with a query term.
        _stats - statistics of the query term
      • QueryTermProperties

        public QueryTermProperties​(int _index,
                                   double w,
                                   WeightingModel model,
                                   EntryStatistics _stats)
        A constructor for setting a weight, a term score modifier and the term code for a query term.
        Parameters:
        w - double the weight of a query term.
        model - WeightingModel modifier associated with a query term.
        _stats - statistics of the query term
    • Method Detail

      • getWeight

        public double getWeight()
      • getTags

        public java.util.Set<java.lang.String> getTags()
      • getRequired

        public java.lang.Boolean getRequired()
      • setWeight

        public void setWeight​(double weight)
      • setTag

        public void setTag​(java.lang.String tag)
      • setRequired

        public void setRequired​(boolean b)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object _o)
        Overrides:
        equals in class java.lang.Object