Skip to content

Commit

Permalink
Add documentation about disabling _field_names. (#26813)
Browse files Browse the repository at this point in the history
This field has significant index-time overhead.

Closes #26779
  • Loading branch information
jpountz committed Oct 6, 2017
1 parent 100e3c9 commit 4e1ff8d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/reference/how-to/indexing-speed.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ The default is `10%` which is often plenty: for example, if you give the JVM
10GB of memory, it will give 1GB to the index buffer, which is enough to host
two shards that are heavily indexing.

[float]
=== Disable `_field_names`

The <<mapping-field-names-field,`_field_names` field>> introduces some
index-time overhead, so you might want to disable it if you never need to
run `exists` queries.

[float]
=== Additional optimizations

Expand Down
22 changes: 22 additions & 0 deletions docs/reference/mapping/fields/field-names-field.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,25 @@ GET my_index/_search
// CONSOLE

<1> Querying on the `_field_names` field (also see the <<query-dsl-exists-query,`exists`>> query)


==== Disabling `_field_names`

Because `_field_names` introduce some index-time overhead, you might want to
disable this field if you want to optimize for indexing speed and do not need
`exists` queries.

[source,js]
--------------------------------------------------
PUT tweets
{
"mappings": {
"tweet": {
"_field_names": {
"enabled": false
}
}
}
}
--------------------------------------------------
// CONSOLE

0 comments on commit 4e1ff8d

Please sign in to comment.