Skip to content

Commit 7d59f49

Browse files
authored
[DOCS] Document index.query.default_field index setting (#69922) (#70529)
1 parent c931c33 commit 7d59f49

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

docs/reference/index-modules.asciidoc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
[[index-modules]]
33
= Index modules
44

5-
[partintro]
6-
--
7-
85
Index Modules are modules created per index and control all aspects related to
96
an index.
107

@@ -249,6 +246,23 @@ specific index module:
249246
The maximum length of regex that can be used in Regexp Query.
250247
Defaults to `1000`.
251248

249+
250+
`index.query.default_field`::
251+
+
252+
--
253+
(string or array of strings)
254+
Wildcard (`*`) patterns matching one or more fields. The following query types
255+
search these matching fields by default:
256+
257+
* <<query-dsl-mlt-query>>
258+
* <<query-dsl-multi-match-query>>
259+
* <<query-dsl-query-string-query>>
260+
* <<query-dsl-simple-query-string-query>>
261+
262+
Defaults to `*`, which matches all fields eligible for
263+
<<term-level-queries,term-level queries>>, excluding metadata fields.
264+
--
265+
252266
`index.routing.allocation.enable`::
253267

254268
Controls shard allocation for this index. It can be set to:
@@ -340,7 +354,6 @@ Other index settings are available in index modules:
340354
<<ilm-settings,{ilm-cap}>>::
341355

342356
Specify the lifecycle policy and rollover alias for an index.
343-
--
344357

345358
include::index-modules/analysis.asciidoc[]
346359

docs/reference/query-dsl/mlt-query.asciidoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ for documents `like: "Apple"`, but `unlike: "cake crumble tree"`. The syntax
175175
is the same as `like`.
176176

177177
`fields`::
178-
A list of fields to fetch and analyze the text from.
178+
A list of fields to fetch and analyze the text from. Defaults to the
179+
`index.query.default_field` index setting, which has a default value of `*`. The
180+
`*` value matches all fields eligible for <<term-level-queries,term-level
181+
queries>>, excluding metadata fields.
179182

180183
[discrete]
181184
[[mlt-query-term-selection]]

0 commit comments

Comments
 (0)