public class CompositeScore<S extends Storable>
extends java.lang.Object
FilteringScore
,
OrderingScore
Modifier and Type | Method and Description |
---|---|
boolean |
canMergeRemainder(CompositeScore<S> other)
Returns true if the filtering score can merge its remainder filter and
the ordering score can merge its remainder orderings.
|
static <S extends Storable> |
evaluate(OrderedProperty<S>[] indexProperties,
boolean unique,
boolean clustered,
Filter<S> filter,
OrderingList<S> ordering)
Evaluates the given index properties for its filtering and ordering
capabilities against the given filter and order-by properties.
|
static <S extends Storable> |
evaluate(StorableIndex<S> index,
Filter<S> filter,
OrderingList<S> ordering)
Evaluates the given index for its filtering and ordering capabilities
against the given filter and order-by properties.
|
static java.util.Comparator<CompositeScore<?>> |
fullComparator()
Returns a comparator which determines which CompositeScores are
better.
|
static java.util.Comparator<CompositeScore<?>> |
fullComparator(QueryHints hints)
Returns a comparator which determines which CompositeScores are
better.
|
FilteringScore<S> |
getFilteringScore()
Returns the score on how well the evaluated index performs the desired
filtering.
|
OrderingScore<S> |
getOrderingScore()
Returns the score on how well the evaluated index performs the desired
ordering.
|
static java.util.Comparator<CompositeScore<?>> |
localForeignComparator()
Returns a partial comparator suited for comparing local indexes to
foreign indexes.
|
static java.util.Comparator<CompositeScore<?>> |
localForeignComparator(QueryHints hints)
Returns a partial comparator suited for comparing local indexes to
foreign indexes.
|
Filter<S> |
mergeRemainderFilter(CompositeScore<S> other)
Merges the remainder filter of this score with the one given using an
'or' operation.
|
OrderingList<S> |
mergeRemainderOrdering(CompositeScore<S> other)
Merges the remainder orderings of this score with the one given.
|
java.lang.String |
toString() |
CompositeScore<S> |
withRemainderFilter(Filter<S> filter)
Returns a new CompositeScore with the filtering remainder replaced and
covering matches recalculated.
|
CompositeScore<S> |
withRemainderOrdering(OrderingList<S> ordering)
Returns a new CompositeScore with the ordering remainder
replaced.
|
public static <S extends Storable> CompositeScore<S> evaluate(StorableIndex<S> index, Filter<S> filter, OrderingList<S> ordering)
index
- index to evaluatefilter
- optional filter which cannot contain any logical 'or' operations.ordering
- optional properties which define desired orderingjava.lang.IllegalArgumentException
- if index is null or filter is not supportedpublic static <S extends Storable> CompositeScore<S> evaluate(OrderedProperty<S>[] indexProperties, boolean unique, boolean clustered, Filter<S> filter, OrderingList<S> ordering)
indexProperties
- index properties to evaluateunique
- true if index is uniqueclustered
- true if index is clusteredfilter
- optional filter which cannot contain any logical 'or' operations.ordering
- optional properties which define desired orderingjava.lang.IllegalArgumentException
- if index is null or filter is not supportedpublic static java.util.Comparator<CompositeScore<?>> localForeignComparator()
<0
if first score is better,
0
if equal, or >0
if second is better.public static java.util.Comparator<CompositeScore<?>> localForeignComparator(QueryHints hints)
<0
if first score is better,
0
if equal, or >0
if second is better.hints
- optional hintspublic static java.util.Comparator<CompositeScore<?>> fullComparator()
<0
if first score is better,
0
if equal, or >0
if second is better.public static java.util.Comparator<CompositeScore<?>> fullComparator(QueryHints hints)
<0
if first score is better,
0
if equal, or >0
if second is better.hints
- optional hintspublic FilteringScore<S> getFilteringScore()
public OrderingScore<S> getOrderingScore()
public boolean canMergeRemainder(CompositeScore<S> other)
public Filter<S> mergeRemainderFilter(CompositeScore<S> other)
public OrderingList<S> mergeRemainderOrdering(CompositeScore<S> other)
public CompositeScore<S> withRemainderFilter(Filter<S> filter)
public CompositeScore<S> withRemainderOrdering(OrderingList<S> ordering)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.