Hi rauan, what I ended up doing is reading the mapping json into local cache periodically and when constructing the facet query, I would verify that the field I want to facet on is in the mapping.. If not in the mapping then I don't include it in the query.. The no mapping exception is some initial query validation that is run prior to your query executing so I don't think there is another way around it.
Sent from my iPhone
On Dec 1, 2012, at 10:43 PM, Rauan Maemirov rauan1987@gmail.com wrote:
I'm having similar problems for facets with dynamic fields.
Is it possible to ignore 'mapping does not exist' issues and don't raise exceptions?Le jeudi 19 juillet 2012 14:00:15 UTC+6, Clinton Gormley a écrit :
On Wed, 2012-07-18 at 13:32 -0700, Jack Markarian wrote:
Hey everyone,
I'm having a problem with the facet filter "exists"... My document
design looks like this: http://pastie.org/4279850 ... I want to be
able to do a statistical facet for date.cpX to get an aggregation..
So, an example use case is querying all users for docuements that had
a session in a particular date range.. Then, I would aggregate each
checkpoint for every date in that range.. However, not all documents
will have a session on every day.. That's where I hoped to apply my
facet filter here: http://pastie.org/4279233An object/hash container is not indexed as a field - only its scalar (or
array of scalars) contents. Try running the 'exists' filter on
'2016-07-01.cp1' instead.clint
As you can see in the query, I first want to match all, and then for
all docuemnts that have a field "2016-07-01", I want to add up the
values for "2016-07-01.cp1"... However, I get a "No mapping found for
field" exception.. I would think this shouldn't happen, because I am
disregarding documents that don't have a 2016-07-01 date stamp..
(also, here is the exception I get: http://pastie.org/4279892 )Any help would be much appreciated!
Thanks,
Jack--
--