I have been using ElasticSearch for the past 2 months and have tried
various aggregations and filtering options on my data and is very happy
with the performance.
But, recently there is a requirement to implement some algorithms on my
data set while retrieving data from ElasticSearch. This requirement is not
solved by existing aggregations or filters.
So, is there a way of implementing any algorithm or custom aggregations on
the data present in ElasticSearch ???
There is a way, but it is not documented as the aggregations internal API
is not stable (and we kind-of like having this ability to break it whenever
we want...) so it's very likely that upgrading your code to a new release
would require important refactorings. Basically you need to write a plugin
that will call AggregationModule.addAggregatorParser with a parser for your
own aggregation. You can get inspiration from an existing aggregation such
as the stats aggregation (in org.elasticsearch.search.aggregations.stats)
to get started.
That said if you think that you need is common, a better option might be to
open an issue so that we implement it and expose it in Elasticsearch, this
way you would not have to maintain it yourself.
I have been using Elasticsearch for the past 2 months and have tried
various aggregations and filtering options on my data and is very happy
with the performance.
But, recently there is a requirement to implement some algorithms on my
data set while retrieving data from Elasticsearch. This requirement is not
solved by existing aggregations or filters.
So, is there a way of implementing any algorithm or custom aggregations on
the data present in Elasticsearch ???
On Saturday, January 3, 2015 1:23:44 AM UTC+5:30, Adrien Grand wrote:
There is a way, but it is not documented as the aggregations internal API
is not stable (and we kind-of like having this ability to break it whenever
we want...) so it's very likely that upgrading your code to a new release
would require important refactorings. Basically you need to write a plugin
that will call AggregationModule.addAggregatorParser with a parser for your
own aggregation. You can get inspiration from an existing aggregation such
as the stats aggregation (in org.elasticsearch.search.aggregations.stats)
to get started.
That said if you think that you need is common, a better option might be
to open an issue so that we implement it and expose it in Elasticsearch,
this way you would not have to maintain it yourself.
On Thu, Jan 1, 2015 at 10:39 AM, cto@TCS <rimita...@gmail.com
<javascript:>> wrote:
Hi,
I have been using Elasticsearch for the past 2 months and have tried
various aggregations and filtering options on my data and is very happy
with the performance.
But, recently there is a requirement to implement some algorithms on my
data set while retrieving data from Elasticsearch. This requirement is not
solved by existing aggregations or filters.
So, is there a way of implementing any algorithm or custom aggregations
on the data present in Elasticsearch ???
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.