Class IndexSupport
- java.lang.Object
-
- com.googlecode.cqengine.index.support.IndexSupport
-
public class IndexSupport extends Object
Index utilities
- Author:
- Silvano Riz
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <O,A>
ResultSet<O>deduplicateIfNecessary(Iterable<? extends ResultSet<O>> results, Query<O> query, Attribute<O,A> attribute, QueryOptions queryOptions, int retrievalCost)
If a query option specifying logical deduplication was supplied, wrap the given result sets inResultSetUnion
, otherwise wrap inResultSetUnionAll
.
-
-
-
Method Detail
-
deduplicateIfNecessary
public static <O,A> ResultSet<O> deduplicateIfNecessary(Iterable<? extends ResultSet<O>> results, Query<O> query, Attribute<O,A> attribute, QueryOptions queryOptions, int retrievalCost)
If a query option specifying logical deduplication was supplied, wrap the given result sets in
ResultSetUnion
, otherwise wrap inResultSetUnionAll
.There are two exceptions where a
ResultSetUnionAll
is used regardless of the logical deduplication query option:-
If the index is built on a SimpleAttribute which means that the same object could not exist in more than one
StoredResultSet
. -
If the query is an
In
query and it is marked as disjoint (In.isDisjoint()
returns true )
- Parameters:
results
- Provides the result sets to unionquery
- The query for which the union is being constructedqueryOptions
- Specifies whether or not logical deduplication is requiredretrievalCost
- The resultSet retrieval cost- Returns:
- A union view over the given result sets
-
If the index is built on a SimpleAttribute which means that the same object could not exist in more than one
-
-