google cloud datastore - Comparing two different properties in GQL -
the following 2 gql queries work:
select * customer firstname = "john" select * customer rating > 4.0
but, when combine them...
select * customer firstname = "john" , rating > 4.0
... empty result set though running queries individually finds entity looking for. how compare more 1 property?
here's i've done:
- i made sure @ least 1 entity exists both true.
- i created index properties:
patrick costello @ google answered question:
you need index on (firstname, rating). current index cannot answer query.
basically, problem created index on properties. however, each "type" of query (in case, query comparing firstname , rating) needs own index (i.e. index firstname , rating). hope helps someone!
Comments
Post a Comment