Skip to content

Commit 1f2c619

Browse files
committed
Remove match_only_text and pattern_text from text docs page
1 parent 64b2bd5 commit 1f2c619

File tree

1 file changed

+0
-119
lines changed
  • docs/reference/elasticsearch/mapping-reference

1 file changed

+0
-119
lines changed

docs/reference/elasticsearch/mapping-reference/text.md

Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -292,122 +292,3 @@ PUT my-index-000001
292292
}
293293
}
294294
```
295-
296-
297-
## Match-only text field type [match-only-text-field-type]
298-
299-
A variant of [`text`](#text-field-type) 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](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) 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.
300-
301-
Analysis is not configurable: text is always analyzed with the [default analyzer](docs-content://manage-data/data-store/text-analysis/specify-an-analyzer.md#specify-index-time-default-analyzer) ([`standard`](/reference/text-analysis/analysis-standard-analyzer.md) by default).
302-
303-
[span queries](/reference/query-languages/query-dsl/span-queries.md) are not supported with this field, use [interval queries](/reference/query-languages/query-dsl/query-dsl-intervals-query.md) instead, or the [`text`](#text-field-type) field type if you absolutely need span queries.
304-
305-
Other than that, `match_only_text` supports the same queries as `text`. And like `text`, it does not support sorting and has only limited support for aggregations.
306-
307-
```console
308-
PUT logs
309-
{
310-
"mappings": {
311-
"properties": {
312-
"@timestamp": {
313-
"type": "date"
314-
},
315-
"message": {
316-
"type": "match_only_text"
317-
}
318-
}
319-
}
320-
}
321-
```
322-
323-
324-
### Parameters for match-only text fields [match-only-text-params]
325-
326-
The following mapping parameters are accepted:
327-
328-
[`fields`](/reference/elasticsearch/mapping-reference/multi-fields.md)
329-
: 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.
330-
331-
[`meta`](/reference/elasticsearch/mapping-reference/mapping-field-meta.md)
332-
: Metadata about the field.
333-
334-
335-
## Pattern text field type [pattern-text-field-type]
336-
```{applies_to}
337-
serverless: preview
338-
stack: preview 9.2
339-
```
340-
:::{note}
341-
This feature requires a [subscription](https://www.elastic.co/subscriptions).
342-
:::
343-
344-
The `pattern_text` field type is a variant of [`text`](#text-field-type) with improved space efficiency for log data.
345-
Internally, it decomposes values into static parts that are likely to be shared among many values, and dynamic parts that tend to vary.
346-
The static parts usually come from the explanatory text of a log message, while the dynamic parts are the variables that were interpolated into the logs.
347-
This decomposition allows for improved compression on log-like data.
348-
349-
We call the static portion of the value the `template`.
350-
Although the template cannot be accessed directly, a separate field called `<field_name>.template_id` is accessible.
351-
This field is a hash of the template and can be used to group similar values.
352-
353-
Analysis is configurable but defaults to a delimiter-based analyzer.
354-
This analyzer applies a lowercase filter and then splits on whitespace and the following delimiters: `=`, `?`, `:`, `[`, `]`, `{`, `}`, `"`, `\`, `'`.
355-
356-
### Limitations
357-
358-
Unlike most mapping types, `pattern_text` does not support multiple values for a given field per document.
359-
If a document is created with multiple values for a pattern_text field, an error will be returned.
360-
361-
[span queries](/reference/query-languages/query-dsl/span-queries.md) are not supported with this field, use [interval queries](/reference/query-languages/query-dsl/query-dsl-intervals-query.md) instead, or the [`text`](#text-field-type) field type if you absolutely need span queries.
362-
363-
Like `text`, `pattern_text` does not support sorting and has only limited support for aggregations.
364-
365-
### Phrase matching
366-
Pattern text supports an `index_options` parameter with valid values of `docs` and `positions`.
367-
The default value is `docs`, which makes `pattern_text` behave similarly to `match_only_text` for phrase queries.
368-
Specifically, positions are not stored, which reduces the index size at the cost of slowing down phrase queries.
369-
If `index_options` is set to `positions`, positions are stored and `pattern_text` will support fast phrase queries.
370-
In both cases, all queries return a constant score of 1.0.
371-
372-
### Index sorting for improved compression
373-
The compression provided by `pattern_text` can be significantly improved if the index is sorted by the `template_id` field.
374-
For example, a typical approach would be to sort first by `message.template_id`, then by `@timestamp`, as shown in the following example.
375-
376-
```console
377-
PUT logs
378-
{
379-
"settings": {
380-
"index": {
381-
"sort.field": [ "message.template_id", "@timestamp" ],
382-
"sort.order": [ "asc", "desc" ]
383-
}
384-
},
385-
"mappings": {
386-
"properties": {
387-
"@timestamp": {
388-
"type": "date"
389-
},
390-
"message": {
391-
"type": "pattern_text"
392-
}
393-
}
394-
}
395-
}
396-
```
397-
398-
399-
### Parameters for pattern text fields [pattern-text-params]
400-
401-
The following mapping parameters are accepted:
402-
403-
[`analyzer`](/reference/elasticsearch/mapping-reference/analyzer.md)
404-
: The [analyzer](docs-content://manage-data/data-store/text-analysis.md) which should be used for the `pattern_text` field, both at index-time and at search-time (unless overridden by the [`search_analyzer`](/reference/elasticsearch/mapping-reference/search-analyzer.md)).
405-
Supports a delimiter-based analyzer and the standard analyzer, as is used in `match_only_text` mappings.
406-
Defaults to the delimiter-based analyzer, which applies a lowercase filter and then splits on whitespace and the following delimiters: `=`, `?`, `:`, `[`, `]`, `{`, `}`, `"`, `\`, `'`.
407-
408-
[`index_options`](/reference/elasticsearch/mapping-reference/index-options.md)
409-
: What information should be stored in the index, for search and highlighting purposes. Valid values are `docs` and `positions`. Defaults to `docs`.
410-
411-
[`meta`](/reference/elasticsearch/mapping-reference/mapping-field-meta.md)
412-
: Metadata about the field.
413-

0 commit comments

Comments
 (0)