Module org.elasticsearch.xcore
Class SourceConfig
java.lang.Object
org.elasticsearch.xpack.core.transform.transforms.SourceConfig
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
-
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 ParseFieldstatic final ConstructingObjectParser<SourceConfig, TransformParsingContext> static final ParseFieldstatic final ParseFieldstatic final ConstructingObjectParser<SourceConfig, TransformParsingContext> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionSourceConfig(String... index) Create a new SourceConfig for the provided indices.SourceConfig(String[] index, QueryConfig queryConfig, Map<String, Object> runtimeMappings, String projectRouting) Create a new SourceConfig for the provided indices, from which data is gathered with the providedQueryConfigSourceConfig(String[] index, QueryConfig queryConfig, Map<String, Object> runtimeMappings, IndicesOptions indicesOptions, String projectRouting) Create a new SourceConfig for the provided indices, from which data is gathered with the providedQueryConfig -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckForDeprecations(String id, NamedXContentRegistry namedXContentRegistry, Consumer<DeprecationIssue> onDeprecation) booleanstatic SourceConfigfromXContent(XContentParser parser, boolean lenient, TransformParsingContext context) String[]getIndex()inthashCode()booleantoXContent(XContentBuilder builder, ToXContent.Params params) validate(ActionRequestValidationException validationException) voidwriteTo(StreamOutput out) 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
-
QUERY
-
INDEX
-
PROJECT_ROUTING
-
STRICT_PARSER
-
LENIENT_PARSER
-
-
Constructor Details
-
SourceConfig
Create a new SourceConfig for the provided indices.QueryConfigdefaults to a MatchAll query.- Parameters:
index- Any number of indices. At least one non-null, non-empty, index should be provided
-
SourceConfig
public SourceConfig(String[] index, QueryConfig queryConfig, Map<String, Object> runtimeMappings, @Nullable String projectRouting) Create a new SourceConfig for the provided indices, from which data is gathered with the providedQueryConfig- Parameters:
index- Any number of indices. At least one non-null, non-empty, index should be providedqueryConfig- A QueryConfig object that contains the desired query, needs to be non-nullruntimeMappings- Search-time runtime fields that can be used by the transformprojectRouting- filter for cross-project search, null when cross-project search is disabled
-
SourceConfig
public SourceConfig(String[] index, QueryConfig queryConfig, Map<String, Object> runtimeMappings, IndicesOptions indicesOptions, @Nullable String projectRouting) Create a new SourceConfig for the provided indices, from which data is gathered with the providedQueryConfig- Parameters:
index- Any number of indices. At least one non-null, non-empty, index should be providedqueryConfig- A QueryConfig object that contains the desired query, needs to be non-nullruntimeMappings- Search-time runtime fields that can be used by the transformindicesOptions- IndicesOptions to use when searching the indexprojectRouting- filter for cross-project search, null when cross-project search is disabled
-
SourceConfig
- Throws:
IOException
-
-
Method Details
-
getIndex
-
getQueryConfig
-
getRuntimeMappings
-
getScriptBasedRuntimeMappings
-
getProjectRouting
-
indicesOptions
-
validate
public ActionRequestValidationException validate(ActionRequestValidationException validationException) -
checkForDeprecations
public void checkForDeprecations(String id, NamedXContentRegistry namedXContentRegistry, Consumer<DeprecationIssue> onDeprecation) -
requiresRemoteCluster
public boolean requiresRemoteCluster() -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
fromXContent
public static SourceConfig fromXContent(XContentParser parser, boolean lenient, TransformParsingContext context) throws IOException - Throws:
IOException
-