Package org.elasticsearch.action.search
Class SearchScrollRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.search.SearchScrollRequest
-
- All Implemented Interfaces:
Streamable,Writeable,ToXContent,ToXContentObject,TaskAwareRequest
public class SearchScrollRequest extends ActionRequest implements ToXContentObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description SearchScrollRequest()SearchScrollRequest(java.lang.String scrollId)SearchScrollRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description TaskcreateTask(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)Returns the task object that should be used to keep track of the processing of the request.booleanequals(java.lang.Object o)voidfromXContent(XContentParser parser)Parse a search scroll request from a request body provided through the REST layer.java.lang.StringgetDescription()Returns optional description of the request to be displayed by the task managerinthashCode()voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.Scrollscroll()If set, will enable scrolling of the search request.SearchScrollRequestscroll(java.lang.String keepAlive)If set, will enable scrolling of the search request for the specified timeout.SearchScrollRequestscroll(TimeValue keepAlive)If set, will enable scrolling of the search request for the specified timeout.SearchScrollRequestscroll(Scroll scroll)If set, will enable scrolling of the search request.java.lang.StringscrollId()The scroll id used to scroll the search.SearchScrollRequestscrollId(java.lang.String scrollId)java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
SearchScrollRequest
public SearchScrollRequest()
-
SearchScrollRequest
public SearchScrollRequest(java.lang.String scrollId)
-
SearchScrollRequest
public SearchScrollRequest(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionRequest- Throws:
java.io.IOException
-
validate
public ActionRequestValidationException validate()
- Specified by:
validatein classActionRequest
-
scrollId
public java.lang.String scrollId()
The scroll id used to scroll the search.
-
scrollId
public SearchScrollRequest scrollId(java.lang.String scrollId)
-
scroll
public Scroll scroll()
If set, will enable scrolling of the search request.
-
scroll
public SearchScrollRequest scroll(Scroll scroll)
If set, will enable scrolling of the search request.
-
scroll
public SearchScrollRequest scroll(TimeValue keepAlive)
If set, will enable scrolling of the search request for the specified timeout.
-
scroll
public SearchScrollRequest scroll(java.lang.String keepAlive)
If set, will enable scrolling of the search request for the specified timeout.
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classActionRequest- Throws:
java.io.IOException
-
createTask
public Task createTask(long id, java.lang.String type, java.lang.String action, TaskId parentTaskId, java.util.Map<java.lang.String,java.lang.String> headers)
Description copied from interface:TaskAwareRequestReturns the task object that should be used to keep track of the processing of the request.- Specified by:
createTaskin interfaceTaskAwareRequest
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TaskAwareRequestReturns optional description of the request to be displayed by the task manager- Specified by:
getDescriptionin interfaceTaskAwareRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
fromXContent
public void fromXContent(XContentParser parser) throws java.io.IOException
Parse a search scroll request from a request body provided through the REST layer. Values that are already be set and are also found while parsing will be overridden.- Throws:
java.io.IOException
-
-