You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/elasticsearch/mapping-reference/pattern-text.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,8 +46,18 @@ In both cases, all queries return a constant score of 1.0.
46
46
47
47
## Index sorting for improved compression
48
48
The compression provided by `pattern_text` can be significantly improved if the index is sorted by the `template_id` field.
49
-
This sorting is not applied by default, but can be enabled for the `message` field of LogsDB indices (assuming it is of type `pattern_text`) by setting the index setting `index.logsdb.default_sort_on_message_template` to `true`.
49
+
50
+
51
+
### Default sorting for LogsDB
52
+
```{applies_to}
53
+
serverless: preview
54
+
stack: preview 9.3
55
+
```
56
+
This index sorting is not applied by default, but can be enabled for the `message` field of LogsDB indices (assuming it is of type `pattern_text`) by setting the index setting `index.logsdb.default_sort_on_message_template` to `true`.
50
57
This will cause the index to be sorted by `host.name` (if present), then `message.template_id`, and finally by `@timestamp`.
58
+
59
+
60
+
### Custom sorting
51
61
If the index is not LogsDB or the `pattern_text` field is named something other than `message`, index sorting can still be manually applied as shown in the following example.
52
62
53
63
```console
@@ -73,6 +83,7 @@ PUT logs
73
83
```
74
84
75
85
86
+
76
87
## Parameters for pattern text fields [pattern-text-params]
0 commit comments