Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city and
value field is mobile_sales.
But I cannot apply the filter on the aggregated values of mobile_sales. The
filter will be applied at the record/row level of mobile_sales.
It there a way or workaround for this. Or is this something that I need to
tweak in elastic search?
The facet class give you the handle to apply the logic at the aggregation
level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final output.
The logic can be applied here,to apply the filter on aggregated values.
But this solution would require changing the Elasticsearch code. And I do
not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city and
value field is mobile_sales.
But I cannot apply the filter on the aggregated values of mobile_sales.
The filter will be applied at the record/row level of mobile_sales.
It there a way or workaround for this. Or is this something that I need to
tweak in Elasticsearch?
This is something you currently need to do in your application layer or
indeed write a custom facet.
Pretty sure you know, but if you are only interested in a great-than
filtering, you can sort the term stat's response by total (in you example,
the sum of mobile_sales) and ignore all the entries (cities) bellow your
threshold.
Cheers,
Boaz
On Monday, July 8, 2013 8:24:22 PM UTC+2, Amit Singh wrote:
I was able to figure out this one.
The facet class give you the handle to apply the logic at the aggregation
level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final
output. The logic can be applied here,to apply the filter on aggregated
values.
But this solution would require changing the Elasticsearch code. And I do
not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city and
value field is mobile_sales.
But I cannot apply the filter on the aggregated values of mobile_sales.
The filter will be applied at the record/row level of mobile_sales.
It there a way or workaround for this. Or is this something that I need
to tweak in Elasticsearch?
This is something you currently need to do in your application layer or
indeed write a custom facet.
Pretty sure you know, but if you are only interested in a great-than
filtering, you can sort the term stat's response by total (in you example,
the sum of mobile_sales) and ignore all the entries (cities) bellow your
threshold.
Cheers,
Boaz
On Monday, July 8, 2013 8:24:22 PM UTC+2, Amit Singh wrote:
I was able to figure out this one.
The facet class give you the handle to apply the logic at the aggregation
level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final
output. The logic can be applied here,to apply the filter on aggregated
values.
But this solution would require changing the Elasticsearch code. And I
do not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city and
value field is mobile_sales.
But I cannot apply the filter on the aggregated values of mobile_sales.
The filter will be applied at the record/row level of mobile_sales.
It there a way or workaround for this. Or is this something that I need
to tweak in Elasticsearch?
On Tue, Jul 9, 2013 at 5:52 PM, Boaz Leskes <b.le...@gmail.com<javascript:>
wrote:
Hi Amit,
This is something you currently need to do in your application layer or
indeed write a custom facet.
Pretty sure you know, but if you are only interested in a great-than
filtering, you can sort the term stat's response by total (in you example,
the sum of mobile_sales) and ignore all the entries (cities) bellow your
threshold.
Cheers,
Boaz
On Monday, July 8, 2013 8:24:22 PM UTC+2, Amit Singh wrote:
I was able to figure out this one.
The facet class give you the handle to apply the logic at the
aggregation level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final
output. The logic can be applied here,to apply the filter on aggregated
values.
But this solution would require changing the Elasticsearch code. And I
do not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city
and value field is mobile_sales.
But I cannot apply the filter on the aggregated values of mobile_sales.
The filter will be applied at the record/row level of mobile_sales.
It there a way or workaround for this. Or is this something that I need
to tweak in Elasticsearch?
Thanks
Amit
--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
On Tue, Jul 9, 2013 at 5:52 PM, Boaz Leskes b.le...@gmail.com wrote:
Hi Amit,
This is something you currently need to do in your application layer or
indeed write a custom facet.
Pretty sure you know, but if you are only interested in a great-than
filtering, you can sort the term stat's response by total (in you example,
the sum of mobile_sales) and ignore all the entries (cities) bellow your
threshold.
Cheers,
Boaz
On Monday, July 8, 2013 8:24:22 PM UTC+2, Amit Singh wrote:
I was able to figure out this one.
The facet class give you the handle to apply the logic at the
aggregation level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final
output. The logic can be applied here,to apply the filter on
aggregated values.
But this solution would require changing the Elasticsearch code. And I
do not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city
and value field is mobile_sales.
But I cannot apply the filter on the aggregated values of
mobile_sales. The filter will be applied at the record/row level of
mobile_sales.
It there a way or workaround for this. Or is this something that I
need to tweak in Elasticsearch?
Thanks
Amit
--
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 elasticsearc...@**googlegroups.com.
On Tue, Jul 9, 2013 at 5:52 PM, Boaz Leskes b.le...@gmail.com wrote:
Hi Amit,
This is something you currently need to do in your application layer or
indeed write a custom facet.
Pretty sure you know, but if you are only interested in a great-than
filtering, you can sort the term stat's response by total (in you example,
the sum of mobile_sales) and ignore all the entries (cities) bellow your
threshold.
Cheers,
Boaz
On Monday, July 8, 2013 8:24:22 PM UTC+2, Amit Singh wrote:
I was able to figure out this one.
The facet class give you the handle to apply the logic at the
aggregation level on terms.
@Override
*public* Facet reduce(List<Facet> facets)
Here all the data from respective shards is merged to get the final
output. The logic can be applied here,to apply the filter on
aggregated values.
But this solution would require changing the Elasticsearch code. And
I do not want to modify the existing Elasticsearch code.
Any other option or way of achieving this?
Thanks
Amit
On Monday, July 8, 2013 2:49:30 PM UTC+5:30, Amit Singh wrote:
Hi All,
Is there a way that the filter can be applied on the aggregated
values.
My requirement is to apply filter on aggregated values;
example;
list all cities with mobile_sales greater than 5,000.
I can do this by TermsStatsFacetBuilder, where my key field is city
and value field is mobile_sales.
But I cannot apply the filter on the aggregated values of
mobile_sales. The filter will be applied at the record/row level of
mobile_sales.
It there a way or workaround for this. Or is this something that I
need to tweak in Elasticsearch?
Thanks
Amit
--
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 elasticsearc...@**googlegroups.com.
--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
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.