I have the following error:
412 no matching index found. recommended index is:
- kind: monthly_report
properties:
- name: belongs_to
- name: date_added
I am using Python 3.5, the datastore, and a remote Django project which is accessing the datastore through google-cloud API (google-cloud==0.24.0).
I ran the commands:
google cloud datastore cleanup-indexes index.yaml
google cloud datastore create-indexes index.yaml
The indexes are created:
index.yaml:
indexes:
- kind: history
ancestor: no
properties:
- name: date_added
direction: asc
- name: address
direction: asc
- kind: payment
ancestor: no
properties:
- name: date_added
direction: asc
- name: belongs_to
- name: order
- kind: monthly_report
ancestor: no
properties:
- name: date_added
direction: asc
- name: status
- name: belongs_to
direction: asc
I make a query on kind payment with filters on date_added and belongs_to. It works.
However, in the same method, I make a query on kind monthly_report with filters on date_added and belongs to, and I get the error above.
What is the issue?
Update:
If I filter for one name it works, for multiple names it does not.