Package org.apache.solr.search
Class CursorMark
- java.lang.Object
 - 
- org.apache.solr.search.CursorMark
 
 
- 
public final class CursorMark extends Object
An object that encapsulates the basic information about the current Mark Point of a "Cursor" based request.CursorMarkobjects track the sort values of the last document returned to a user, so thatSolrIndexSearchercan then be asked to find all documents "after" the values represented by thisCursorMark. 
- 
- 
Constructor Summary
Constructors Constructor Description CursorMark(IndexSchema schema, SortSpec sortSpec)Generates an empty CursorMark bound for use with the specified schema andSortSpec. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CursorMarkcreateNext(List<Object> nextSortValues)Generates an new CursorMark bound for use with the sameSortSpecas the current CursorMark but using the new SortValues.org.apache.lucene.search.FieldDocgetSearchAfterFieldDoc()Returns a synthetically constructedFieldDocwhoseFieldDoc.fieldsmatch the values of this object.StringgetSerializedTotem()Generates a Base64 encoded serialized representation of the sort values encapsulated by this object, for use in cursor requests.SortSpecgetSortSpec()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)voidparseSerializedTotem(String serialized)Parses the serialized version of a CursorMark from a client (which must conform to the existing sortSpec) and populates this object.voidsetSortValues(List<Object> input)Sets the (raw, unmarshalled) sort values (which must conform to the existing sortSpec) to populate this object. 
 - 
 
- 
- 
Constructor Detail
- 
CursorMark
public CursorMark(IndexSchema schema, SortSpec sortSpec)
Generates an empty CursorMark bound for use with the specified schema andSortSpec.- Parameters:
 schema- used for basic validationsortSpec- bound to this totem (un)marshalling serialized values
 
 - 
 
- 
Method Detail
- 
createNext
public CursorMark createNext(List<Object> nextSortValues)
Generates an new CursorMark bound for use with the sameSortSpecas the current CursorMark but using the new SortValues. 
- 
setSortValues
public void setSortValues(List<Object> input)
Sets the (raw, unmarshalled) sort values (which must conform to the existing sortSpec) to populate this object. If null, then there is nothing to "search after" and the "first page" of results should be returned. 
- 
getSortValues
public 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) 
- 
getSortSpec
public SortSpec getSortSpec()
Returns the SortSpec used by this object. 
- 
parseSerializedTotem
public 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.- See Also:
 getSerializedTotem()
 
- 
getSerializedTotem
public String getSerializedTotem()
Generates a Base64 encoded serialized representation of the sort values encapsulated by this object, for use in cursor requests.- See Also:
 parseSerializedTotem(java.lang.String)
 
- 
getSearchAfterFieldDoc
public org.apache.lucene.search.FieldDoc getSearchAfterFieldDoc()
Returns a synthetically constructedFieldDocwhoseFieldDoc.fieldsmatch the values of this object.Important Notes:
ScoreDoc.docwill always be set toInteger.MAX_VALUEso that the tie breaking logic used byIndexSearcherwon't select the same doc again based on the internal lucene docId when the SolruniqueKeyvalue is the same.ScoreDoc.scorewill always be set to 0.0F since it is not used when applyingsearchAfterlogic. (Even if the sort values themselves contain scores which are used in the sort)
- Returns:
 - a 
FieldDocto "search after" or null if the initial page of results is requested. 
 
 - 
 
 -