python - 412 no matching index found Error -


i have following error:

412 no matching index found. recommended index is:
- kind: monthly_report
properties:
- name: belongs_to
- name: date_added

i using python 3.5, datastore, , remote django project accessing datastore through google-cloud api (google-cloud==0.24.0).

i ran commands:

google cloud datastore cleanup-indexes index.yaml google cloud datastore create-indexes index.yaml 

the indexes 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 query on kind payment filters on date_added , belongs_to. works.

however, in same method, make query on kind monthly_report filters on date_added , belongs to, , error above.

what issue?

update:

if filter 1 name works, multiple names not.

google app engine's datastore automatically creates indices whenever make query involving filters used. stores table data in index serves quickly. so, whenever deploy have update new indices.

if deploying using appcfg then, appcfg.py -a <project-name> update_indexes .

here . path of index.yaml file.

whenever no matching index found or needindexerror or missing index error, error suggests index missing. so, have put suggested index index.yaml file , update indices using above command.

in case, add missing index index.yaml file.

- kind: monthly_report   properties:   - name: belongs_to   - name: date_added 

i hope helps. more information datastore indices


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -