GoogleCloudPlatform / appengine-mapreduce

A library for running MapReduce jobs on App Engine
https://github.com/GoogleCloudPlatform/appengine-mapreduce/wiki/1-MapReduce
Apache License 2.0
234 stars 109 forks source link

multiple filters on single kind create multiple index entries #108

Open NickFranceschina opened 7 years ago

NickFranceschina commented 7 years ago

see my comment here (not sure if it would be seen, so posting an issue):

https://github.com/GoogleCloudPlatform/appengine-mapreduce/commit/3bcd874ebde611807f5e59e0194918fea5095243#commitcomment-20242630

because this .Get happens inside of the for loop over the filters... if I have multiple filters, then the SDK ends up generating multiple indexes, each one with progressively more properties

for example... if I had filters=[('one', '=', 'a'), ('two', '=', 'b'), ('three', '=', 3)] ... then after this loop completes, the SDK has created all of these in my index.yaml:

- kind: MyModel
  properties:
  - name: one
  - name: __scatter__

- kind: MyModel
  properties:
  - name: one
  - name: two
  - name: __scatter__

- kind: MyModel
  properties:
  - name: one
  - name: two
  - name: three
  - name: __scatter__

is this expected behavior?