diff --git a/output/schema/schema.json b/output/schema/schema.json index c13a83ca80..6c14b60175 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -54786,7 +54786,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L90-L92" + "specLocation": "_types/mapping/core.ts#L91-L93" }, { "inherits": { @@ -54854,7 +54854,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L94-L100" + "specLocation": "_types/mapping/core.ts#L95-L101" }, { "inherits": { @@ -54889,7 +54889,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L187-L190" + "specLocation": "_types/mapping/core.ts#L188-L191" }, { "inherits": { @@ -55021,7 +55021,7 @@ "name": "CoreProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L59-L64", + "specLocation": "_types/mapping/core.ts#L59-L65", "type": { "items": [ { @@ -55058,6 +55058,13 @@ "name": "DocValuesProperty", "namespace": "_types.mapping" } + }, + { + "kind": "instance_of", + "type": { + "name": "MatchOnlyTextProperty", + "namespace": "_types.mapping" + } } ], "kind": "union_of" @@ -55200,7 +55207,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L114-L122" + "specLocation": "_types/mapping/core.ts#L115-L123" }, { "inherits": { @@ -55312,7 +55319,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L102-L112" + "specLocation": "_types/mapping/core.ts#L103-L113" }, { "inherits": { @@ -55466,7 +55473,7 @@ "name": "DocValuesProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L70-L88", + "specLocation": "_types/mapping/core.ts#L71-L89", "type": { "items": [ { @@ -55624,7 +55631,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L66-L68" + "specLocation": "_types/mapping/core.ts#L67-L69" }, { "inherits": { @@ -55659,7 +55666,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L167-L170" + "specLocation": "_types/mapping/core.ts#L168-L171" }, { "inherits": { @@ -56018,13 +56025,16 @@ }, { "name": "dense_vector" + }, + { + "name": "match_only_text" } ], "name": { "name": "FieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L66-L108" + "specLocation": "_types/mapping/Property.ts#L66-L109" }, { "inherits": { @@ -56182,7 +56192,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L157-L160" + "specLocation": "_types/mapping/core.ts#L158-L161" }, { "inherits": { @@ -56569,7 +56579,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L162-L165" + "specLocation": "_types/mapping/core.ts#L163-L166" }, { "inherits": { @@ -56647,7 +56657,7 @@ "name": "IndexOptions", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L240-L245" + "specLocation": "_types/mapping/core.ts#L268-L273" }, { "inherits": { @@ -56682,7 +56692,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L172-L175" + "specLocation": "_types/mapping/core.ts#L173-L176" }, { "inherits": { @@ -56859,7 +56869,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L124-L127" + "specLocation": "_types/mapping/core.ts#L125-L128" }, { "inherits": { @@ -56971,7 +56981,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L129-L139" + "specLocation": "_types/mapping/core.ts#L130-L140" }, { "inherits": { @@ -57006,7 +57016,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L177-L180" + "specLocation": "_types/mapping/core.ts#L178-L181" }, { "inherits": { @@ -57032,6 +57042,85 @@ ], "specLocation": "_types/mapping/range.ts#L58-L60" }, + { + "description": "A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field\neffectively stores data the same way as a text field that only indexes documents (index_options: docs) and\ndisables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries\nthat need positions such as the match_phrase query perform slower as they need to look at the _source document\nto verify whether a phrase matches. All queries return constant scores that are equal to 1.0.", + "kind": "interface", + "name": { + "name": "MatchOnlyTextProperty", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "match_only_text" + } + }, + { + "description": "Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one\nfield for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers.", + "docId": "multi-fields", + "name": "fields", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "PropertyName", + "namespace": "_types" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "Property", + "namespace": "_types.mapping" + } + } + } + }, + { + "description": "Metadata about the field.", + "docId": "mapping-meta-field", + "name": "meta", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "Allows you to copy the values of multiple fields into a group\nfield, which can then be queried as a single field.", + "name": "copy_to", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + } + ], + "specLocation": "_types/mapping/core.ts#L241-L266" + }, { "kind": "enum", "members": [ @@ -57135,7 +57224,7 @@ "name": "NumberProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L204-L213", + "specLocation": "_types/mapping/core.ts#L205-L214", "type": { "items": [ { @@ -57241,7 +57330,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L141-L144" + "specLocation": "_types/mapping/core.ts#L142-L145" }, { "inherits": { @@ -57292,7 +57381,7 @@ "name": "OnScriptError", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L146-L149" + "specLocation": "_types/mapping/core.ts#L147-L150" }, { "inherits": { @@ -57316,7 +57405,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L215-L217" + "specLocation": "_types/mapping/core.ts#L216-L218" }, { "inherits": { @@ -57726,7 +57815,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L219-L222" + "specLocation": "_types/mapping/core.ts#L220-L223" }, { "inherits": { @@ -57750,7 +57839,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L224-L226" + "specLocation": "_types/mapping/core.ts#L225-L227" }, { "kind": "interface", @@ -57928,7 +58017,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L197-L202" + "specLocation": "_types/mapping/core.ts#L198-L203" }, { "inherits": { @@ -58040,7 +58129,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L228-L238" + "specLocation": "_types/mapping/core.ts#L229-L239" }, { "description": "The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as\nrectangles and polygons.", @@ -58145,7 +58234,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L182-L185" + "specLocation": "_types/mapping/core.ts#L183-L186" }, { "kind": "interface", @@ -58286,7 +58375,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L151-L155" + "specLocation": "_types/mapping/core.ts#L152-L156" }, { "kind": "interface", @@ -58415,7 +58504,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L247-L250" + "specLocation": "_types/mapping/core.ts#L275-L278" }, { "inherits": { @@ -58593,7 +58682,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L252-L268" + "specLocation": "_types/mapping/core.ts#L280-L296" }, { "inherits": { @@ -58945,7 +59034,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L192-L195" + "specLocation": "_types/mapping/core.ts#L193-L196" }, { "inherits": { @@ -58969,7 +59058,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L270-L272" + "specLocation": "_types/mapping/core.ts#L298-L300" }, { "inherits": { @@ -59005,7 +59094,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L274-L278" + "specLocation": "_types/mapping/core.ts#L302-L306" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 78496c5d00..8b2d6bb333 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -4422,7 +4422,7 @@ export interface MappingConstantKeywordProperty extends MappingPropertyBase { type: 'constant_keyword' } -export type MappingCoreProperty = MappingObjectProperty | MappingNestedProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingDocValuesProperty +export type MappingCoreProperty = MappingObjectProperty | MappingNestedProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingDocValuesProperty | MappingMatchOnlyTextProperty export interface MappingCorePropertyBase extends MappingPropertyBase { copy_to?: Fields @@ -4512,7 +4512,7 @@ export interface MappingFieldNamesField { enabled: boolean } -export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' +export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'match_only_text' export interface MappingFlattenedProperty extends MappingPropertyBase { boost?: double @@ -4634,6 +4634,13 @@ export interface MappingLongRangeProperty extends MappingRangePropertyBase { type: 'long_range' } +export interface MappingMatchOnlyTextProperty { + type: 'match_only_text' + fields?: Record + meta?: Record + copy_to?: Fields +} + export type MappingMatchType = 'simple' | 'regex' export interface MappingMurmur3HashProperty extends MappingDocValuesPropertyBase { diff --git a/specification/_types/mapping/Property.ts b/specification/_types/mapping/Property.ts index 694f22932a..2a70e6d612 100644 --- a/specification/_types/mapping/Property.ts +++ b/specification/_types/mapping/Property.ts @@ -64,47 +64,48 @@ export type Property = | CoreProperty export enum FieldType { - none = 0, - geo_point = 1, - geo_shape = 2, - ip = 3, - binary = 4, - keyword = 5, - text = 6, - search_as_you_type = 7, - date = 8, - date_nanos = 9, - boolean = 10, - completion = 11, - nested = 12, - object = 13, - murmur3 = 14, - token_count = 15, - percolator = 16, - integer = 17, - long = 18, - short = 19, - byte = 20, - float = 21, - half_float = 22, - scaled_float = 23, - double = 24, - integer_range = 25, - float_range = 26, - long_range = 27, - double_range = 28, - date_range = 29, - ip_range = 30, - alias = 31, - join = 32, - rank_feature = 33, - rank_features = 34, - flattened = 35, - shape = 36, - histogram = 37, - constant_keyword = 38, - aggregate_metric_double = 39, - dense_vector = 40 + none, + geo_point, + geo_shape, + ip, + binary, + keyword, + text, + search_as_you_type, + date, + date_nanos, + boolean, + completion, + nested, + object, + murmur3, + token_count, + percolator, + integer, + long, + short, + byte, + float, + half_float, + scaled_float, + double, + integer_range, + float_range, + long_range, + double_range, + date_range, + ip_range, + alias, + join, + rank_feature, + rank_features, + flattened, + shape, + histogram, + constant_keyword, + aggregate_metric_double, + dense_vector, + match_only_text } export class PropertyWithClrOrigin {} diff --git a/specification/_types/mapping/core.ts b/specification/_types/mapping/core.ts index 6cc3cae83d..82324e8ed1 100644 --- a/specification/_types/mapping/core.ts +++ b/specification/_types/mapping/core.ts @@ -20,7 +20,7 @@ import { FielddataFrequencyFilter } from '@indices/_types/FielddataFrequencyFilter' import { NumericFielddata } from '@indices/_types/NumericFielddata' import { Dictionary } from '@spec_utils/Dictionary' -import { Fields, RelationName } from '@_types/common' +import { Fields, PropertyName, RelationName } from '@_types/common' import { byte, double, @@ -38,7 +38,7 @@ import { PointProperty, ShapeProperty } from './geo' -import { PropertyBase } from './Property' +import { Property, PropertyBase } from './Property' import { RangeProperty } from './range' import { CompletionProperty, @@ -62,6 +62,7 @@ export type CoreProperty = | SearchAsYouTypeProperty | TextProperty | DocValuesProperty + | MatchOnlyTextProperty export class DocValuesPropertyBase extends CorePropertyBase { doc_values?: boolean @@ -237,11 +238,38 @@ export class SearchAsYouTypeProperty extends CorePropertyBase { type: 'search_as_you_type' } +/** + * A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field + * effectively stores data the same way as a text field that only indexes documents (index_options: docs) and + * disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries + * that need positions such as the match_phrase query perform slower as they need to look at the _source document + * to verify whether a phrase matches. All queries return constant scores that are equal to 1.0. + */ +export class MatchOnlyTextProperty { + type: 'match_only_text' + /** + * Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one + * field for search and a multi-field for sorting and aggregations, or the same string value analyzed by different analyzers. + * @doc_id multi-fields + */ + fields?: Dictionary + /** + * Metadata about the field. + * @doc_id mapping-meta-field + */ + meta?: Dictionary + /** + * Allows you to copy the values of multiple fields into a group + * field, which can then be queried as a single field. + */ + copy_to?: Fields +} + export enum IndexOptions { - docs = 0, - freqs = 1, - positions = 2, - offsets = 3 + docs, + freqs, + positions, + offsets } export class TextIndexPrefixes {