diff options
author | Adrien Grand <jpountz@gmail.com> | 2017-06-01 17:23:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-01 17:23:22 +0200 |
commit | bbdf50f6bdd06d53a3cb9f58d606628f92eccda9 (patch) | |
tree | ec72913f2bc71b59978271143bf156149350ba9f /docs/reference/how-to | |
parent | 4185337df17d0716c42ce946b713c67f0f4481cf (diff) |
Docs: More search speed advices. (#24802)
Diffstat (limited to 'docs/reference/how-to')
-rw-r--r-- | docs/reference/how-to/search-speed.asciidoc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/reference/how-to/search-speed.asciidoc b/docs/reference/how-to/search-speed.asciidoc index 2d0525a48e..42a03dd8fd 100644 --- a/docs/reference/how-to/search-speed.asciidoc +++ b/docs/reference/how-to/search-speed.asciidoc @@ -310,3 +310,19 @@ setting. WARNING: Loading data into the filesystem cache eagerly on too many indices or too many files will make search _slower_ if the filesystem cache is not large enough to hold all the data. Use with caution. + +[float] +=== Map identifiers as `keyword` + +When you have numeric identifiers in your documents, it is tempting to map them +as numbers, which is consistent with their json type. However, the way that +Elasticsearch indexes numbers optimizes for `range` queries while `keyword` +fields are better at `term` queries. Since identifiers are never used in `range` +queries, they should be mapped as a `keyword`. + +[float] +=== Use index sorting to speed up conjunctions + +<<index-modules-index-sorting,Index sorting>> can be useful in order to make +conjunctions faster at the cost of slightly slower indexing. Read more about it +in the <<index-modules-index-sorting-conjunctions,index sorting documentation>>. |