diff --git a/output/schema/schema.json b/output/schema/schema.json index 550ec0664d..6d6c688ab2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -55215,7 +55215,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L91-L93" + "specLocation": "_types/mapping/core.ts#L92-L94" }, { "inherits": { @@ -55283,7 +55283,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L95-L101" + "specLocation": "_types/mapping/core.ts#L96-L102" }, { "inherits": { @@ -55318,7 +55318,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L191-L194" + "specLocation": "_types/mapping/core.ts#L192-L195" }, { "inherits": { @@ -55450,7 +55450,7 @@ "name": "CoreProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L60-L65", + "specLocation": "_types/mapping/core.ts#L60-L66", "type": { "items": [ { @@ -55487,6 +55487,13 @@ "name": "DocValuesProperty", "namespace": "_types.mapping" } + }, + { + "kind": "instance_of", + "type": { + "name": "MatchOnlyTextProperty", + "namespace": "_types.mapping" + } } ], "kind": "union_of" @@ -55650,7 +55657,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L115-L123" + "specLocation": "_types/mapping/core.ts#L116-L124" }, { "inherits": { @@ -55762,7 +55769,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L103-L113" + "specLocation": "_types/mapping/core.ts#L104-L114" }, { "inherits": { @@ -55916,7 +55923,7 @@ "name": "DocValuesProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L71-L89", + "specLocation": "_types/mapping/core.ts#L72-L90", "type": { "items": [ { @@ -56074,7 +56081,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L67-L69" + "specLocation": "_types/mapping/core.ts#L68-L70" }, { "inherits": { @@ -56109,7 +56116,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L171-L174" + "specLocation": "_types/mapping/core.ts#L172-L175" }, { "inherits": { @@ -56468,13 +56475,16 @@ }, { "name": "dense_vector" + }, + { + "name": "match_only_text" } ], "name": { "name": "FieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L67-L109" + "specLocation": "_types/mapping/Property.ts#L67-L110" }, { "inherits": { @@ -56632,7 +56642,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L161-L164" + "specLocation": "_types/mapping/core.ts#L162-L165" }, { "inherits": { @@ -57020,7 +57030,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L166-L169" + "specLocation": "_types/mapping/core.ts#L167-L170" }, { "inherits": { @@ -57098,7 +57108,7 @@ "name": "IndexOptions", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L244-L249" + "specLocation": "_types/mapping/core.ts#L272-L277" }, { "inherits": { @@ -57133,7 +57143,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L176-L179" + "specLocation": "_types/mapping/core.ts#L177-L180" }, { "inherits": { @@ -57310,7 +57320,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L125-L128" + "specLocation": "_types/mapping/core.ts#L126-L129" }, { "inherits": { @@ -57434,7 +57444,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L130-L142" + "specLocation": "_types/mapping/core.ts#L131-L143" }, { "inherits": { @@ -57469,7 +57479,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L181-L184" + "specLocation": "_types/mapping/core.ts#L182-L185" }, { "inherits": { @@ -57495,6 +57505,87 @@ ], "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", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.0/multi-fields.html", + "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", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/8.0/mapping-meta-field.html", + "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#L245-L270" + }, { "kind": "enum", "members": [ @@ -57598,7 +57689,7 @@ "name": "NumberProperty", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L208-L217", + "specLocation": "_types/mapping/core.ts#L209-L218", "type": { "items": [ { @@ -57715,7 +57806,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L144-L148" + "specLocation": "_types/mapping/core.ts#L145-L149" }, { "inherits": { @@ -57766,7 +57857,7 @@ "name": "OnScriptError", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L150-L153" + "specLocation": "_types/mapping/core.ts#L151-L154" }, { "inherits": { @@ -57790,7 +57881,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L219-L221" + "specLocation": "_types/mapping/core.ts#L220-L222" }, { "inherits": { @@ -58202,7 +58293,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L223-L226" + "specLocation": "_types/mapping/core.ts#L224-L227" }, { "inherits": { @@ -58226,7 +58317,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L228-L230" + "specLocation": "_types/mapping/core.ts#L229-L231" }, { "kind": "interface", @@ -58419,7 +58510,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L201-L206" + "specLocation": "_types/mapping/core.ts#L202-L207" }, { "inherits": { @@ -58531,7 +58622,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L232-L242" + "specLocation": "_types/mapping/core.ts#L233-L243" }, { "description": "The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as\nrectangles and polygons.", @@ -58637,7 +58728,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L186-L189" + "specLocation": "_types/mapping/core.ts#L187-L190" }, { "kind": "interface", @@ -58778,7 +58869,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L155-L159" + "specLocation": "_types/mapping/core.ts#L156-L160" }, { "kind": "interface", @@ -58907,7 +58998,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L251-L254" + "specLocation": "_types/mapping/core.ts#L279-L282" }, { "inherits": { @@ -59085,7 +59176,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L256-L272" + "specLocation": "_types/mapping/core.ts#L284-L300" }, { "kind": "enum", @@ -59472,7 +59563,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L196-L199" + "specLocation": "_types/mapping/core.ts#L197-L200" }, { "inherits": { @@ -59496,7 +59587,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L274-L276" + "specLocation": "_types/mapping/core.ts#L302-L304" }, { "inherits": { @@ -59532,7 +59623,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L278-L282" + "specLocation": "_types/mapping/core.ts#L306-L310" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5daa570656..6d2ed16ceb 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -4486,7 +4486,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 @@ -4580,7 +4580,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 @@ -4703,6 +4703,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/_doc_ids/table.csv b/specification/_doc_ids/table.csv index f6966ca7da..596c09ddbb 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -399,3 +399,4 @@ supported-flags,https://www.elastic.co/guide/en/elasticsearch/reference/8.0/quer eql-sequences,https://www.elastic.co/guide/en/elasticsearch/reference/8.0/eql-syntax.html#eql-sequences index-modules-settings,https://www.elastic.co/guide/en/elasticsearch/reference/8.0/index-modules.html#index-modules-settings templating-role-query,https://www.elastic.co/guide/en/elasticsearch/reference/8.0/field-and-document-access-control.html#templating-role-query +multi-fields,https://www.elastic.co/guide/en/elasticsearch/reference/8.0/multi-fields.html diff --git a/specification/_types/mapping/Property.ts b/specification/_types/mapping/Property.ts index edb808d5ed..332fdf8614 100644 --- a/specification/_types/mapping/Property.ts +++ b/specification/_types/mapping/Property.ts @@ -65,47 +65,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 f5503c58f5..b4dedbac29 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, @@ -63,6 +63,7 @@ export type CoreProperty = | SearchAsYouTypeProperty | TextProperty | DocValuesProperty + | MatchOnlyTextProperty export class DocValuesPropertyBase extends CorePropertyBase { doc_values?: boolean @@ -241,11 +242,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 {