Class SearchResultsWrapper.IDScore

  • Enclosing class:
    SearchResultsWrapper

    public static final class SearchResultsWrapper.IDScore
    extends Object
    Internal-use class to wrap response of search interface.
    • Constructor Detail

      • IDScore

        public IDScore​(String primaryKey,
                       String strID,
                       long longID,
                       float score)
    • Method Detail

      • getPrimaryKey

        public String getPrimaryKey()
      • getStrID

        public String getStrID()
      • getLongID

        public long getLongID()
      • getScore

        public float getScore()
      • getFieldValues

        public Map<String,​Object> getFieldValues()
        Get all field values as a map
        Returns:
        Map containing all field values
      • put

        public boolean put​(String keyName,
                           Object obj)
        Add a field value to the existing values
        Parameters:
        keyName - field name
        obj - field value
        Returns:
        true if the value was added, false if the key already exists
      • get

        public Object get​(String keyName)
                   throws ParamException
        Get a value by a key name. If the key name is a field name, return the value of this field. If the key name is in dynamic field, return the value from the dynamic field. Throws ParamException if the key name doesn't exist.
        Parameters:
        keyName - a field name or a dynamic field name
        Returns:
        Object
        Throws:
        ParamException
      • contains

        public boolean contains​(String keyName)
        Test if a key exists
        Parameters:
        keyName - a field name or a dynamic field name
        Returns:
        boolean