|
I understand that when you facet or sort on a field, it loads all of the possible values of that field into the field cache. This can get huge, and is usually the cause of a lot of heap OOM errors, especially on fields with high cardinality. My question is, are the values of the field that are put into the field cache limited by the number of records returned by the query, or does ElasticSearch load all unique values of a field into the field cache regardless of the filters? If so, which filters limit them? Are there only certain kinds of queries that limit these as well? I read another post that said only the constant_score query limits the records used in the cache.
Example: { "query": { "filtered": { "query": { ...QUERY A... }, "filter": { ... FILTER A...} } }, "filter": { ...FILTER B... }, "facets": { "hugeFacet": { "terms": { "field": "fieldWithGBofUniqueValues" }, "facet_filter": { ...FILTER C... } } } }
-- I know that QUERY A, FILTER A, FILTER B, and FILTER C will limit the records that my hugeFacet will use when returning results. However:
You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
|
Fount the post: https://groups.google.com/d/topic/elasticsearch/ArOHQIKiMKE/discussion
"So if you need to account for filters when you run facets, you need to either wrap them in the constant_score query or use facet_filter." Maybe I misunderstood. Any clarification on my 2 questions above would be greatly appreciated. On Monday, February 11, 2013 3:24:46 PM UTC-5, Mike wrote: I understand that when you facet or sort on a field, it loads all of the possible values of that field into the field cache. This can get huge, and is usually the cause of a lot of heap OOM errors, especially on fields with high cardinality. My question is, are the values of the field that are put into the field cache limited by the number of records returned by the query, or does ElasticSearch load all unique values of a field into the field cache regardless of the filters? If so, which filters limit them? Are there only certain kinds of queries that limit these as well? I read another post that said only the constant_score query limits the records used in the cache.-- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
|
Hello Mike, For sorting, Elasticsearch sorts all the documents matching your query and filters, then gives you the top X items back. Any document that's filtered out by either your query or your filter won't bother caches.Radu -- http://sematext.com/ -- ElasticSearch -- Solr -- Lucene On Wed, Feb 13, 2013 at 5:50 PM, Mike <[hidden email]> wrote: Fount the post: https://groups.google.com/d/topic/elasticsearch/ArOHQIKiMKE/discussion You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
| Powered by Nabble | Edit this page |
