Module org.elasticsearch.server
Class FetchSourceContext
java.lang.Object
org.elasticsearch.search.fetch.subphase.FetchSourceContext
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
Context used to fetch the
_source.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FetchSourceContextstatic final ParseFieldstatic final ParseFieldstatic final FetchSourceContextstatic final ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionbooleanString[]excludes()booleanfilter()Returns aSourceFilterif filtering is enabled,nullotherwise.static FetchSourceContextfromXContent(XContentParser parser) inthashCode()String[]includes()static FetchSourceContextof(boolean fetchSource) static FetchSourceContextstatic FetchSourceContextstatic FetchSourceContextparseFromRestRequest(RestRequest request) static FetchSourceContextreadFrom(StreamInput in) toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EXCLUDE_VECTORS_FIELD
-
INCLUDES_FIELD
-
EXCLUDES_FIELD
-
FETCH_SOURCE
-
DO_NOT_FETCH_SOURCE
-
-
Method Details
-
of
-
of
public static FetchSourceContext of(boolean fetchSource, @Nullable String[] includes, @Nullable String[] excludes) -
of
-
readFrom
- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
fetchSource
public boolean fetchSource() -
excludeVectors
-
includes
-
excludes
-
filter
Returns aSourceFilterif filtering is enabled,nullotherwise. -
parseFromRestRequest
-
fromXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-