Class Ranking

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Ranking
    extends java.lang.Object
    implements java.lang.Cloneable
    The ranking (hit ordering) settings of a query
    Author:
    Arne Bergene Fossaa, bratseth
    • Constructor Detail

      • Ranking

        public Ranking​(Query parent)
    • Method Detail

      • hasRankProfile

        public boolean hasRankProfile()
        Returns whether a rank profile has been explicitly set. This is only used in serializing the packet properly to FS4.
      • getFreshness

        public Freshness getFreshness()
        Get the freshness search parameters associated with this query
      • setFreshness

        public void setFreshness​(java.lang.String dateTime)
        Set the freshness search parameters for this query
      • setFreshness

        public void setFreshness​(Freshness freshness)
      • setQueryCache

        public void setQueryCache​(boolean queryCache)
        Returns whether feature caching is turned on in the backed. Feature caching allows us to avoid sending the query during document summary retrieval and recalculate feature scores, it is typically beneficial to turn it on if fan-out is low or queries are large.

        Default is false (off).

      • getQueryCache

        public boolean getQueryCache()
      • getLocation

        public Location getLocation()
        Returns the location of this query, or null if none
      • setLocation

        public void setLocation​(Location location)
      • setLocation

        public void setLocation​(java.lang.String str)
        Sets the location from a string, see Location for syntax
      • getProfile

        public java.lang.String getProfile()
        Returns the name of the rank profile to be used. Returns "default" if nothing is set.
      • setProfile

        public void setProfile​(java.lang.String profile)
        Sets the name of the rank profile to use. This cannot be set to null.
      • getFeatures

        public RankFeatures getFeatures()
        Returns the rank features of this, an empty container (never null) if none are set. The returned object can be modified directly to change the rank properties of this.
      • getProperties

        public RankProperties getProperties()
        Returns the rank properties of this, an empty container (never null) if none are set. The returned object can be modified directly to change the rank properties of this.
      • setListFeatures

        public void setListFeatures​(boolean listFeatures)
        Set whether rank features should be included with the result of this query
      • getListFeatures

        public boolean getListFeatures()
        Returns whether rank features should be dumped with the result of this query, default false
      • getMatchPhase

        public MatchPhase getMatchPhase()
        Returns the match phase rank settings of this. This is never null.
      • getMatching

        public Matching getMatching()
        Returns the matching settings of this. This is never null.
      • getSoftTimeout

        public SoftTimeout getSoftTimeout()
        Returns the soft timeout settings of this. This is never null.
      • clone

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public Sorting getSorting()
        Returns the sorting spec of this query, or null if none is set
      • setSorting

        public void setSorting​(Sorting sorting)
        Sets how this query should be sorted. Set to null to turn off explicit sorting.
      • setSorting

        public void setSorting​(java.lang.String sortingString)
        Sets sorting from a string. See Sorting on syntax
      • prepare

        public void prepare()