I'm trying to execute statistical facet with filter. So I'm using
"facet_filter" without success.
Could you please help me with correct query?
Or maybe there is something else wrong?
My ElasticSearch version is 0.20.2.
My document structure/mapping is:
{"wch1":{"properties":{"HouseCode":{"type":"string",
"index":"not_analyzed"},"numbers":{"type":"long"},"period":{"type":"string",
"index":"not_analyzed"}}}}
Example document:
{HouseCode:"AB", period:["2013-04-03|2013-04-24", "2013-05-03|2013-05-24",
"2013-06-03|2013-06-24"], numbers:[3,13,7,33,179,170987]}
I'm trying to execute statistical facet with filter. So I'm using
"facet_filter" without success.
Could you please help me with correct query?
Or maybe there is something else wrong?
My Elasticsearch version is 0.20.2.
My document structure/mapping is:
{"wch1":{"properties":{"HouseCode":{"type":"string",
"index":"not_analyzed"},"numbers":{"type":"long"},"period":{"type":"string",
"index":"not_analyzed"}}}}
Example document:
{HouseCode:"AB", period:["2013-04-03|2013-04-24", "2013-05-03|2013-05-24",
"2013-06-03|2013-06-24"], numbers:[3,13,7,33,179,170987]}
It helped, but now I have other problem, the statistic is taken from all
documents, not from that which have HouseCode = AB.
How should I filter a statistical facet for specyfic HouseCode or other
fields conditions?
A term filter/query does an exact match, so the term filtered on must have
the correct case. Not sure how I ended up lowercasing AB since all I did
was copy-n-paste.
It helped, but now I have other problem, the statistic is taken from all
documents, not from that which have HouseCode = AB.
How should I filter a statistical facet for specyfic HouseCode or other
fields conditions?
I think it's not the lowercase/uppercase problem if the codes are exact.
I want to compute facet only on specific (filtered) documents and I'm not
able to do that with filter. I can only do that with query, which I don't
wont.
So is it possible to filter facet ? To do facet on filtered documents?
On Friday, 22 March 2013 17:08:50 UTC+1, Ivan Brusic wrote:
A term filter/query does an exact match, so the term filtered on must have
the correct case. Not sure how I ended up lowercasing AB since all I did
was copy-n-paste.
It helped, but now I have other problem, the statistic is taken from all
documents, not from that which have HouseCode = AB.
How should I filter a statistical facet for specyfic HouseCode or other
fields conditions?
Best Regards,
Waldek
--
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.
After a very careful examination of the output.
It turns out that everything is fine.
Construction for the queries where, the query is by default "match_all" ES
shows / returns all documents, but the facet is calculated according to the
filter. (So be warned.)
It turns out that facet_filter works correctly.
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.