public final class CursorMark extends Object
CursorMark
objects track the sort values of
the last document returned to a user, so that SolrIndexSearcher
can then
be asked to find all documents "after" the values represented by this
CursorMark
.Constructor and Description |
---|
CursorMark(IndexSchema schema,
SortSpec sortSpec)
Generates an empty CursorMark bound for use with the
specified schema and
SortSpec . |
Modifier and Type | Method and Description |
---|---|
CursorMark |
createNext(List<Object> nextSortValues)
Generates an new CursorMark bound for use with the same
SortSpec
as the current CursorMark but using the new SortValues. |
FieldDoc |
getSearchAfterFieldDoc()
Returns a synthetically constructed
FieldDoc whose FieldDoc.fields
match the values of this object. |
String |
getSerializedTotem()
Generates a Base64 encoded serialized representation of the sort values
encapsulated by this object, for use in cursor requests.
|
SortSpec |
getSortSpec()
Returns the SortSpec used by this object.
|
List<Object> |
getSortValues()
Returns a copy of the (raw, unmarshalled) sort values used by this object, or
null if first page of docs should be returned (ie: no sort after)
|
void |
parseSerializedTotem(String serialized)
Parses the serialized version of a CursorMark from a client
(which must conform to the existing sortSpec) and populates this object.
|
void |
setSortValues(List<Object> input)
Sets the (raw, unmarshalled) sort values (which must conform to the existing
sortSpec) to populate this object.
|
public CursorMark(IndexSchema schema, SortSpec sortSpec)
SortSpec
.schema
- used for basic validationsortSpec
- bound to this totem (un)marshalling serialized valuespublic CursorMark createNext(List<Object> nextSortValues)
SortSpec
as the current CursorMark but using the new SortValues.public void setSortValues(List<Object> input)
public List<Object> getSortValues()
public SortSpec getSortSpec()
public void parseSerializedTotem(String serialized)
getSerializedTotem()
public String getSerializedTotem()
public FieldDoc getSearchAfterFieldDoc()
FieldDoc
whose FieldDoc.fields
match the values of this object.
Important Notes:
ScoreDoc.doc
will always be set to Integer.MAX_VALUE
so
that the tie breaking logic used by IndexSearcher
won't select
the same doc again based on the internal lucene docId when the Solr
uniqueKey
value is the same.
ScoreDoc.score
will always be set to 0.0F since it is not used
when applying searchAfter
logic. (Even if the sort values themselves
contain scores which are used in the sort)
FieldDoc
to "search after" or null if the initial
page of results is requested.Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.