Skip to content

Commit

Permalink
fixed logic for model collection indexing with multi-target
Browse files Browse the repository at this point in the history
  • Loading branch information
erikerlandson committed Jun 17, 2012
1 parent 9351eec commit 0166a00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/score_models
Expand Up @@ -73,7 +73,8 @@ if args.scores is not None:
sys.stdout.write("indexing data...\n")
data.ensure_index([(args.cvattr, pymongo.ASCENDING)])
data.ensure_index([(args.user, pymongo.ASCENDING)])
models.ensure_index([("_id.y", pymongo.ASCENDING), ("rr", pymongo.DESCENDING)])
for t in args.target:
t['coll'].ensure_index([("_id.y", pymongo.ASCENDING), ("rr", pymongo.DESCENDING)])

# some scoring stats
nall = 0
Expand Down

0 comments on commit 0166a00

Please sign in to comment.