apachewildcardapigeeusergridapigee-baas

Usergrid query on unknown sub properties


I'm trying to query a collection of data with entities that contain the "related" property:

...,{ related : 
       { global: [{name: "foo"}, {name: "bar"}] },
       { local: [{name: "bar"}] },
       { random: [{name: "foo"}] },
       { dingbat: [{name: "baz"}] },
    }

I want to write a query which selects all entities which have name="foo" anywhere within the related property.

I can do this just fine:

select * where related.global.name='foo'

However there could be any number of keys within the "related" property so I can't just AND them all into a single query. Trying to do something like this (which doesn't work)

select * where related.*.name='foo'

Is there any way to achieve this?


Solution

  • Not at this time. However, it is something we could consider for the future. We have ElasticSearch for indexing in our 2.1 platform and we can use the '_all' functionality from ES but we have not exposed that in Usergrid yet.