Class FS4Hit

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class FS4Hit
    extends Hit
    A single hit from a Vespa content cluster
    Author:
    havardpe
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int classId  
    • Constructor Summary

      Constructors 
      Constructor Description
      FS4Hit()
      Constructs an empty result node.
      FS4Hit​(int path, com.yahoo.document.GlobalId globalId, double rank)
      Create a hit with the given path and document id.
      FS4Hit​(int path, com.yahoo.document.GlobalId globalId, double rank, int distributionKey)
      Create a hit with the given path and document id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int getDistributionKey()
      Obtain the distribution key for the node producing this hit.
      com.yahoo.document.GlobalId getGlobalId()
      Obtain the global document id on the search node returning this hit.
      int getPath()
      Obtain the (mangled) network path back to the search node returning this hit.
      int hashCode()  
      protected void onDeserialize​(com.yahoo.vespa.objects.Deserializer buf)  
      protected int onGetClassId()  
      protected void onSerialize​(com.yahoo.vespa.objects.Serializer buf)  
      void visitMembers​(com.yahoo.vespa.objects.ObjectVisitor visitor)  
      • Methods inherited from class com.yahoo.vespa.objects.Identifiable

        clone, create, createFromId, deserialize, deserializeOptional, deserializeWithId, equals, getClassId, getUtf8, putUtf8, registerClass, serialize, serializeOptional, serializeWithId, toString
      • Methods inherited from class com.yahoo.vespa.objects.Selectable

        select, select, selectMembers
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • classId

        public static final int classId
    • Constructor Detail

      • FS4Hit

        public FS4Hit()
        Constructs an empty result node.
      • FS4Hit

        public FS4Hit​(int path,
                      com.yahoo.document.GlobalId globalId,
                      double rank)
        Create a hit with the given path and document id.
        Parameters:
        path - The mangled search node path.
        globalId - The local document id.
        rank - The rank of this hit.
      • FS4Hit

        public FS4Hit​(int path,
                      com.yahoo.document.GlobalId globalId,
                      double rank,
                      int distributionKey)
        Create a hit with the given path and document id.
        Parameters:
        path - The mangled search node path.
        globalId - The local document id.
        rank - The rank of this hit.
        distributionKey - The doc stamp.
    • Method Detail

      • getPath

        public int getPath()
        Obtain the (mangled) network path back to the search node returning this hit.
        Returns:
        The mangled search node path.
      • getGlobalId

        public com.yahoo.document.GlobalId getGlobalId()
        Obtain the global document id on the search node returning this hit.
        Returns:
        The global document id.
      • getDistributionKey

        public int getDistributionKey()
        Obtain the distribution key for the node producing this hit.
        Returns:
        distribution key
      • onGetClassId

        protected int onGetClassId()
        Overrides:
        onGetClassId in class com.yahoo.vespa.objects.Identifiable
      • onSerialize

        protected void onSerialize​(com.yahoo.vespa.objects.Serializer buf)
        Overrides:
        onSerialize in class Hit
      • onDeserialize

        protected void onDeserialize​(com.yahoo.vespa.objects.Deserializer buf)
        Overrides:
        onDeserialize in class Hit
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Hit
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Hit
      • visitMembers

        public void visitMembers​(com.yahoo.vespa.objects.ObjectVisitor visitor)
        Overrides:
        visitMembers in class Hit