|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.retrieval.SortSpec
public class SortSpec
A class to contain a sorting specification for a results set. Results can be sorted by any combination of saved fields and the score assigned to the document.
| Field Summary | |
|---|---|
protected boolean[] |
directions
The directions in which to sort each of the fields. |
protected BasicField.Fetcher[] |
fetchers
Fetchers for any saved fields in the sorting spec. |
protected FieldInfo[] |
fields
The fields upon which to sort. |
protected static java.lang.String |
logTag
|
protected int |
size
The size of the specification, in terms of the number of fields. |
protected java.lang.String |
spec
The original specification. |
| Constructor Summary | |
|---|---|
SortSpec(PartitionManager manager,
java.lang.String spec)
Creates a sorting specification from the given string description. |
|
SortSpec(SortSpec ss,
InvFileDiskPartition part)
Constructs a partition specific sorting specification that includes fetchers for the saved fields appearing in the sorting specification. |
|
| Method Summary | |
|---|---|
boolean |
getDirection(int i)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String spec
protected int size
protected FieldInfo[] fields
protected BasicField.Fetcher[] fetchers
protected boolean[] directions
true indicates that the sort is in an increasing
direction, while false indicates that the sort is in a
decreasing direction.
protected static java.lang.String logTag
| Constructor Detail |
|---|
public SortSpec(PartitionManager manager,
java.lang.String spec)
spec - The sorting specification. This is of the form:
[+|-]fieldName{,[+|-]fieldName}{,[+|-]fieldName}...
A + indicates that the values from the named field should be sorted in increasing order, and a - indicates that the values from the named field should be sorted in decreasing order. If the direction specifier is not given, + will be assumed. If a field given as part of the sorting specification does not exist or is not a saved field, that field will be ignored for the purposes of sorting.
manager - a partition manager. This is used to retrieve the field
information for each of the named fields.
public SortSpec(SortSpec ss,
InvFileDiskPartition part)
| Method Detail |
|---|
public boolean getDirection(int i)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||