Class PutMappingRequest.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • meta

        public final PutMappingRequest.Builder meta​(java.util.Map<java.lang.String,​JsonData> map)
        A mapping type can have custom meta data associated with it. These are not used at all by Elasticsearch, but can be used to store application-specific metadata.

        API name: _meta

        Adds all entries of map to meta.

      • meta

        public final PutMappingRequest.Builder meta​(java.lang.String key,
                                                    JsonData value)
        A mapping type can have custom meta data associated with it. These are not used at all by Elasticsearch, but can be used to store application-specific metadata.

        API name: _meta

        Adds an entry to meta.

      • allowNoIndices

        public final PutMappingRequest.Builder allowNoIndices​(@Nullable
                                                              java.lang.Boolean value)
        Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

        API name: allow_no_indices

      • dateDetection

        public final PutMappingRequest.Builder dateDetection​(@Nullable
                                                             java.lang.Boolean value)
        Controls whether dynamic date detection is enabled.

        API name: date_detection

      • dynamicDateFormats

        public final PutMappingRequest.Builder dynamicDateFormats​(java.util.List<java.lang.String> list)
        If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.

        API name: dynamic_date_formats

        Adds all elements of list to dynamicDateFormats.

      • dynamicDateFormats

        public final PutMappingRequest.Builder dynamicDateFormats​(java.lang.String value,
                                                                  java.lang.String... values)
        If date detection is enabled then new string fields are checked against 'dynamic_date_formats' and if the value matches then a new date field is added instead of string.

        API name: dynamic_date_formats

        Adds one or more values to dynamicDateFormats.

      • dynamicTemplates

        public final PutMappingRequest.Builder dynamicTemplates​(java.util.List<java.util.Map<java.lang.String,​DynamicTemplate>> list)
        Specify dynamic templates for the mapping.

        API name: dynamic_templates

        Adds all elements of list to dynamicTemplates.

      • dynamicTemplates

        public final PutMappingRequest.Builder dynamicTemplates​(java.util.Map<java.lang.String,​DynamicTemplate> value,
                                                                java.util.Map<java.lang.String,​DynamicTemplate>... values)
        Specify dynamic templates for the mapping.

        API name: dynamic_templates

        Adds one or more values to dynamicTemplates.

      • expandWildcards

        public final PutMappingRequest.Builder expandWildcards​(java.util.List<ExpandWildcard> list)
        Whether to expand wildcard expression to concrete indices that are open, closed or both.

        API name: expand_wildcards

        Adds all elements of list to expandWildcards.

      • expandWildcards

        public final PutMappingRequest.Builder expandWildcards​(ExpandWildcard value,
                                                               ExpandWildcard... values)
        Whether to expand wildcard expression to concrete indices that are open, closed or both.

        API name: expand_wildcards

        Adds one or more values to expandWildcards.

      • ignoreUnavailable

        public final PutMappingRequest.Builder ignoreUnavailable​(@Nullable
                                                                 java.lang.Boolean value)
        Whether specified concrete indices should be ignored when unavailable (missing or closed)

        API name: ignore_unavailable

      • index

        public final PutMappingRequest.Builder index​(java.util.List<java.lang.String> list)
        Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use _all or omit to add the mapping on all indices.

        API name: index

        Adds all elements of list to index.

      • index

        public final PutMappingRequest.Builder index​(java.lang.String value,
                                                     java.lang.String... values)
        Required - A comma-separated list of index names the mapping should be added to (supports wildcards); use _all or omit to add the mapping on all indices.

        API name: index

        Adds one or more values to index.

      • masterTimeout

        @Deprecated
        public final PutMappingRequest.Builder masterTimeout​(@Nullable
                                                             Time value)
        Deprecated.
        Specify timeout for connection to master

        API name: master_timeout

      • clusterManagerTimeout

        public final PutMappingRequest.Builder clusterManagerTimeout​(@Nullable
                                                                     Time value)
        Specify timeout for connection to cluster-manager

        API name: cluster_manager_timeout

      • numericDetection

        public final PutMappingRequest.Builder numericDetection​(@Nullable
                                                                java.lang.Boolean value)
        Automatically map strings into numeric data types for all fields.

        API name: numeric_detection

      • properties

        public final PutMappingRequest.Builder properties​(java.util.Map<java.lang.String,​Property> map)
        Mapping for a field. For new fields, this mapping can include:
        • Field name
        • Field data type
        • Mapping parameters

        API name: properties

        Adds all entries of map to properties.

      • properties

        public final PutMappingRequest.Builder properties​(java.lang.String key,
                                                          Property value)
        Mapping for a field. For new fields, this mapping can include:
        • Field name
        • Field data type
        • Mapping parameters

        API name: properties

        Adds an entry to properties.

      • properties

        public final PutMappingRequest.Builder properties​(java.lang.String key,
                                                          java.util.function.Function<Property.Builder,​ObjectBuilder<Property>> fn)
        Mapping for a field. For new fields, this mapping can include:
        • Field name
        • Field data type
        • Mapping parameters

        API name: properties

        Adds an entry to properties using a builder lambda.

      • writeIndexOnly

        public final PutMappingRequest.Builder writeIndexOnly​(@Nullable
                                                              java.lang.Boolean value)
        When true, applies mappings only to the write index of an alias or data stream

        API name: write_index_only