Hello,
I might found an undocumented restriction of ES facet implementation. I was
trying to do this:
{
"query": { /* Some query - not important / },
"filter": { / MAIN FILTER /,
"facets": {
"foo": {
"terms": {
"term": "foo"
},
"nested": "foo",
"facet_filter": {
"has_parent": { / THIS DOES NOT WORK */ }
}
}
}
}
I don't see any theoretical issue why this is not working. So my question
is: Is this some undocumented restriction or is this just
not-yet-implemented?
P.S.: this can be solved by using another search request or the
multi-search functionality. However my question remains :).
--
Hi,
@Pavel Horal
Did you any workaround for this problem?
@everyone
Is it bug OR feature?
W dniu poniedziałek, 8 października 2012 09:23:33 UTC+2 użytkownik Pavel
Horal napisał:
Hello,
I might found an undocumented restriction of ES facet implementation. I
was trying to do this:
{
"query": { /* Some query - not important / },
"filter": { / MAIN FILTER /,
"facets": {
"foo": {
"terms": {
"term": "foo"
},
"nested": "foo",
"facet_filter": {
"has_parent": { / THIS DOES NOT WORK */ }
}
}
}
}
I don't see any theoretical issue why this is not working. So my question
is: Is this some undocumented restriction or is this just
not-yet-implemented?
P.S.: this can be solved by using another search request or the
multi-search functionality. However my question remains :).
--
I've workarounded this issue by using filter facets with nested filters.
I needed only to return result counts for three nested terms, so I just
added three nested *filter *facets.
Other (more efficient) workaround would be to make totally different search
request using the MAIN FILTER as a part of the query (filtered).
On Wednesday, October 17, 2012 11:52:36 AM UTC+2, Maciej Kowalski wrote:
Hi,
@Pavel Horal
Did you any workaround for this problem?
@everyone
Is it bug OR feature?
W dniu poniedziałek, 8 października 2012 09:23:33 UTC+2 użytkownik Pavel
Horal napisał:
Hello,
I might found an undocumented restriction of ES facet implementation. I
was trying to do this:
{
"query": { /* Some query - not important / },
"filter": { / MAIN FILTER /,
"facets": {
"foo": {
"terms": {
"term": "foo"
},
"nested": "foo",
"facet_filter": {
"has_parent": { / THIS DOES NOT WORK */ }
}
}
}
}
I don't see any theoretical issue why this is not working. So my question
is: Is this some undocumented restriction or is this just
not-yet-implemented?
P.S.: this can be solved by using another search request or the
multi-search functionality. However my question remains :).
--