Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation about disabling _field_names. #26813

Merged
merged 1 commit into from
Oct 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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