public class FetchSourceContext extends java.lang.Object implements Writeable, ToXContent
_source
.Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static FetchSourceContext |
DO_NOT_FETCH_SOURCE |
static ParseField |
EXCLUDES_FIELD |
static FetchSourceContext |
FETCH_SOURCE |
static ParseField |
INCLUDES_FIELD |
EMPTY_PARAMS
Constructor and Description |
---|
FetchSourceContext(boolean fetchSource) |
FetchSourceContext(boolean fetchSource,
java.lang.String[] includes,
java.lang.String[] excludes) |
FetchSourceContext(StreamInput in) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String[] |
excludes() |
boolean |
fetchSource() |
static FetchSourceContext |
fromXContent(XContentParser parser) |
java.util.function.Function<java.util.Map<java.lang.String,?>,java.util.Map<java.lang.String,java.lang.Object>> |
getFilter()
Returns a filter function that expects the source map as an input and returns
the filtered map.
|
int |
hashCode() |
java.lang.String[] |
includes() |
static FetchSourceContext |
parseFromRestRequest(RestRequest request) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isFragment
public static final ParseField INCLUDES_FIELD
public static final ParseField EXCLUDES_FIELD
public static final FetchSourceContext FETCH_SOURCE
public static final FetchSourceContext DO_NOT_FETCH_SOURCE
public FetchSourceContext(boolean fetchSource, java.lang.String[] includes, java.lang.String[] excludes)
public FetchSourceContext(boolean fetchSource)
public FetchSourceContext(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public boolean fetchSource()
public java.lang.String[] includes()
public java.lang.String[] excludes()
public static FetchSourceContext parseFromRestRequest(RestRequest request)
public static FetchSourceContext fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.function.Function<java.util.Map<java.lang.String,?>,java.util.Map<java.lang.String,java.lang.Object>> getFilter()