user1981068
user1981068

Reputation: 21

Forming a GQL query with != not equals

I am trying to form a GQL query that:

SELECT * FROM IvlsRun where origInstrument = 'Catalyst_Dx' and practiceId != '100004'

Finds all IvlsRun(s) where the origInstrument = 'Catalyst_Dx'... but I don't want any of them with practiceId = 10004.

Everytime I add the practiceId != 100004 or practiceId != '100004' I get an error.

I am new to GQL. I am doing this through the datastore viewer.

The error is pretty basic, telling me I don't know how to use GQL:

Learn more about GQL syntax. no matching index found.

Upvotes: 2

Views: 3156

Answers (1)

Peter Knego
Peter Knego

Reputation: 80340

You must define custom index when you use query with one or more inequality filters on a property and one or more equality filters on other properties. See Index Configuration.

Upvotes: 2

Related Questions