script fields are only applicable to the top N docs that you get back (computed and returned), not for the total hits you get. Facets work on all the hits (and because of that, using _source is not recommended, because it means you load it and parse it for each hit out of the total hits). Check the range facet docs: Elasticsearch Platform — Find real-time answers at scale | Elastic, you can have an option to provide a key script and a value script.
On Thursday, March 8, 2012 at 8:12 PM, Jarnoult wrote:
Hi,
I would like to know if it's possible to create a Range Facet on
script_fields ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.