Class OIndexSearchResult

java.lang.Object
com.orientechnologies.orient.core.sql.OIndexSearchResult

public class OIndexSearchResult extends Object
Presents query subset in form of field1 = "field1 value" AND field2 = "field2 value" ... AND fieldN anyOpetator "fieldN value"

Where pairs (field1, value1) ... (fieldn-1, valuen-1) are stored in fieldValuePairs map but last pair is stored in lastField lastValue properties and their operator will be stored in lastOperator property.

Such data structure is used because from composite index point of view any "field and value" pairs can be reordered to match keys order that is used in index in case all fields and values are related to each other using equals operator, but position of field - value pair that uses non equals operator cannot be changed. Actually only one non-equals operator can be used for composite index search and filed - value pair that uses this index should always be placed at last position.

  • Field Details

  • Constructor Details

  • Method Details

    • isIndexEqualityOperator

      public static boolean isIndexEqualityOperator(OQueryOperator queryOperator)
    • merge

      public OIndexSearchResult merge(OIndexSearchResult searchResult)
      Combines two queries subset into one. This operation will be valid only if canBeMerged(OIndexSearchResult) method will return true for the same passed in parameter.
      Parameters:
      searchResult - Query subset to merge.
      Returns:
      New instance that presents merged query.
    • fields

      public List<String> fields()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object