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.

gql

  • i created index properties:

enter image description here

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

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -