Class Document

java.lang.Object
redis.clients.jedis.search.Document
All Implemented Interfaces:
Serializable

public class Document extends Object implements Serializable
Document represents a single indexed document or entity in the engine
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • id

      private final String id
    • score

      private double score
    • payload

      private byte[] payload
    • properties

      private final Map<String,Object> properties
  • Constructor Details

  • Method Details

    • getProperties

      public Iterable<Map.Entry<String,Object>> getProperties()
    • load

      @Deprecated public static Document load(String id, double score, byte[] payload, List<byte[]> fields)
      Deprecated.
    • load

      @Deprecated public static Document load(String id, double score, byte[] payload, List<byte[]> fields, boolean decode)
      Deprecated.
    • set

      public Document set(String key, Object value)
    • get

      public Object get(String key)
      return the property value inside a key
      Parameters:
      key - key of the property
      Returns:
      the property value
    • getString

      public String getString(String key)
      return the property value inside a key
      Parameters:
      key - key of the property
      Returns:
      the property value
    • getScore

      public double getScore()
      Returns:
      the document's score
    • getPayload

      @Deprecated public byte[] getPayload()
      Deprecated.
    • setScore

      public Document setScore(float score)
      Set the document's score
      Parameters:
      score - new score to set
      Returns:
      the document itself
    • getId

      public String getId()
      Returns:
      the document's id
    • hasProperty

      public boolean hasProperty(String key)
    • toString

      public String toString()
      Overrides:
      toString in class Object