diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 24e14a7a2f..f56338e16e 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -68523,47 +68523,28 @@ "_types.mapping.ChunkingSettings": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/_types.mapping.ChunkingStrategy" + "strategy": { + "description": "The chunking strategy: `sentence` or `word`.", + "type": "string" }, "max_chunk_size": { - "description": "The maximum number of words in a chunk.", + "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "type": "number" }, "overlap": { - "description": "The number of overlapping words allowed in chunks. This cannot be \ndefined as more than half of the max_chunk_size. Required for `word`\ntype chunking settings.", + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", "type": "number" }, "sentence_overlap": { - "description": "The number of overlapping sentences allowed in chunks. Required for `sentence` type chunking settings.", - "oneOf": [ - { - "type": "string", - "enum": [ - "0" - ] - }, - { - "type": "string", - "enum": [ - "1" - ] - } - ] + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "type": "number" } }, "required": [ - "type", + "strategy", "max_chunk_size" ] }, - "_types.mapping.ChunkingStrategy": { - "type": "string", - "enum": [ - "word", - "sentence" - ] - }, "_types.mapping.SparseVectorProperty": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index caefacec28..5acf5b4fce 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45099,47 +45099,28 @@ "_types.mapping.ChunkingSettings": { "type": "object", "properties": { - "type": { - "$ref": "#/components/schemas/_types.mapping.ChunkingStrategy" + "strategy": { + "description": "The chunking strategy: `sentence` or `word`.", + "type": "string" }, "max_chunk_size": { - "description": "The maximum number of words in a chunk.", + "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "type": "number" }, "overlap": { - "description": "The number of overlapping words allowed in chunks. This cannot be \ndefined as more than half of the max_chunk_size. Required for `word`\ntype chunking settings.", + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", "type": "number" }, "sentence_overlap": { - "description": "The number of overlapping sentences allowed in chunks. Required for `sentence` type chunking settings.", - "oneOf": [ - { - "type": "string", - "enum": [ - "0" - ] - }, - { - "type": "string", - "enum": [ - "1" - ] - } - ] + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "type": "number" } }, "required": [ - "type", + "strategy", "max_chunk_size" ] }, - "_types.mapping.ChunkingStrategy": { - "type": "string", - "enum": [ - "word", - "sentence" - ] - }, "_types.mapping.SparseVectorProperty": { "allOf": [ { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 314adc4af8..d9c971055d 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -93028,22 +93028,6 @@ ], "specLocation": "_types/analysis/nori-plugin.ts#L28-L34" }, - { - "kind": "enum", - "members": [ - { - "name": "word" - }, - { - "name": "sentence" - } - ], - "name": { - "name": "ChunkingStrategy", - "namespace": "_types.mapping" - }, - "specLocation": "_types/mapping/ChunkingSettings.ts#L47-L50" - }, { "kind": "enum", "members": [ @@ -96071,7 +96055,7 @@ } }, { - "description": "Settings for chunking text into smaller passages. If specified, these will override the \nchunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated,\nthey will not be applied to existing documents until they are reindexed.", + "description": "Settings for chunking text into smaller passages. If specified, these will override the\nchunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated,\nthey will not be applied to existing documents until they are reindexed.", "name": "chunking_settings", "required": false, "type": { @@ -96086,6 +96070,26 @@ "specLocation": "_types/mapping/core.ts#L220-L243" }, { + "attachedBehaviors": [ + "OverloadOf" + ], + "behaviors": [ + { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + } + } + ], + "type": { + "name": "OverloadOf", + "namespace": "_spec_utils" + } + } + ], "kind": "interface", "name": { "name": "ChunkingSettings", @@ -96093,21 +96097,23 @@ }, "properties": [ { - "description": "Indicates the type of strategy to use.", - "name": "type", + "description": "The chunking strategy: `sentence` or `word`.", + "name": "strategy", "required": true, + "serverDefault": "sentence", "type": { "kind": "instance_of", "type": { - "name": "ChunkingStrategy", - "namespace": "_types.mapping" + "name": "string", + "namespace": "_builtins" } } }, { - "description": "The maximum number of words in a chunk.", + "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", "name": "max_chunk_size", "required": true, + "serverDefault": 250, "type": { "kind": "instance_of", "type": { @@ -96117,9 +96123,10 @@ } }, { - "description": "The number of overlapping words allowed in chunks. This cannot be \ndefined as more than half of the max_chunk_size. Required for `word`\ntype chunking settings.", + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", "name": "overlap", "required": false, + "serverDefault": 100, "type": { "kind": "instance_of", "type": { @@ -96129,25 +96136,99 @@ } }, { - "description": "The number of overlapping sentences allowed in chunks. Required for `sentence` type chunking settings.", + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", "name": "sentence_overlap", "required": false, + "serverDefault": 1, "type": { - "items": [ - { - "kind": "literal_value", - "value": 0 - }, - { - "kind": "literal_value", - "value": 1 - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } } } ], - "specLocation": "_types/mapping/ChunkingSettings.ts#L22-L45" + "specLocation": "_types/mapping/ChunkingSettings.ts#L24-L32" + }, + { + "description": "A class that implements `OverloadOf` should have the exact same properties with the same types.\nIt can change if a property is required or not. There is no need to port the descriptions\nand js doc tags, the compiler will do that for you.", + "generics": [ + { + "name": "TDefinition", + "namespace": "_spec_utils.OverloadOf" + } + ], + "kind": "interface", + "name": { + "name": "OverloadOf", + "namespace": "_spec_utils" + }, + "properties": [], + "specLocation": "_spec_utils/behaviors.ts#L102-L108" + }, + { + "description": "Chunking configuration object", + "kind": "interface", + "name": { + "name": "InferenceChunkingSettings", + "namespace": "inference._types" + }, + "properties": [ + { + "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "name": "max_chunk_size", + "required": false, + "serverDefault": 250, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", + "name": "overlap", + "required": false, + "serverDefault": 100, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", + "name": "sentence_overlap", + "required": false, + "serverDefault": 1, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The chunking strategy: `sentence` or `word`.", + "name": "strategy", + "required": false, + "serverDefault": "sentence", + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "inference/_types/Services.ts#L60-L89" }, { "inherits": { @@ -123831,69 +123912,6 @@ ], "specLocation": "inference/_types/Services.ts#L24-L44" }, - { - "description": "Chunking configuration object", - "kind": "interface", - "name": { - "name": "InferenceChunkingSettings", - "namespace": "inference._types" - }, - "properties": [ - { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", - "name": "max_chunk_size", - "required": false, - "serverDefault": 250, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "The number of overlapping words for chunks.\nIt is applicable only to a `word` chunking strategy.\nThis value cannot be higher than half the `max_chunk_size` value.", - "name": "overlap", - "required": false, - "serverDefault": 100, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "The number of overlapping sentences for chunks.\nIt is applicable only for a `sentence` chunking strategy.\nIt can be either `1` or `0`.", - "name": "sentence_overlap", - "required": false, - "serverDefault": 1, - "type": { - "kind": "instance_of", - "type": { - "name": "integer", - "namespace": "_types" - } - } - }, - { - "description": "The chunking strategy: `sentence` or `word`.", - "name": "strategy", - "required": false, - "serverDefault": "sentence", - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - } - ], - "specLocation": "inference/_types/Services.ts#L60-L89" - }, { "description": "InferenceResult is an aggregation of mutually exclusive variants", "kind": "interface", @@ -141554,22 +141572,6 @@ ], "specLocation": "ml/_types/Analysis.ts#L79-L148" }, - { - "description": "A class that implements `OverloadOf` should have the exact same properties with the same types.\nIt can change if a property is required or not. There is no need to port the descriptions\nand js doc tags, the compiler will do that for you.", - "generics": [ - { - "name": "TDefinition", - "namespace": "_spec_utils.OverloadOf" - } - ], - "kind": "interface", - "name": { - "name": "OverloadOf", - "namespace": "_spec_utils" - }, - "properties": [], - "specLocation": "_spec_utils/behaviors.ts#L102-L108" - }, { "attachedBehaviors": [ "OverloadOf"