Add note about caching/speed in filter vs. query

This commit is contained in:
Will Kahn-Greene 2012-09-11 14:56:39 -04:00
Родитель ae2402822c
Коммит 6b74736183
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -170,11 +170,13 @@ things are very different.
A filter determines whether a document is in the results set or
not. If you do a term filter on whether field `foo` has value `bar`,
then the result set ONLY has documents where `foo` has value `bar`.
Filters are fast and filter results are cached in ElasticSearch.
A query affects the score for a document. If you do a term query on
whether field `foo` has value `bar`, then the result set will score
documents where the query holds true higher than documents where the
query does not hold true.
query does not hold true. Queries are slower than filters and
query results are not cached in ElasticSearch.
The other place where this affects things is when you specify
facets. See :ref:`queries-chapter-facets-section` for details.