|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.qe.CompositeScore<S>
public class CompositeScore<S extends Storable>
Evaluates an index for how well it matches a query's desired filtering and ordering. A composite score is not a single absolute value – instead it has a relative weight when compared to other scores.
FilteringScore,
OrderingScore| Method Summary | ||
|---|---|---|
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
|
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
|
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 Comparator<CompositeScore<?>> |
fullComparator()
Returns a comparator which determines which CompositeScores are better. |
|
static 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 Comparator<CompositeScore<?>> |
localForeignComparator()
Returns a partial comparator suited for comparing local indexes to foreign indexes. |
|
static 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. |
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
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 ordering
IllegalArgumentException - if index is null or filter is not supported
public 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 ordering
IllegalArgumentException - if index is null or filter is not supportedpublic static Comparator<CompositeScore<?>> localForeignComparator()
<0 if first score is better,
0 if equal, or >0 if second is better.
public static Comparator<CompositeScore<?>> localForeignComparator(QueryHints hints)
<0 if first score is better,
0 if equal, or >0 if second is better.
hints - optional hintspublic static Comparator<CompositeScore<?>> fullComparator()
<0 if first score is better,
0 if equal, or >0 if second is better.
public static 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 String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||