Browse files

fixed logic for model collection indexing with multi-target

  • Loading branch information...
1 parent 9351eec commit 0166a00560d7595615c41725c8a078dfc15e2379 @erikerlandson committed Jun 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 bin/score_models
View
3 bin/score_models
@@ -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

0 comments on commit 0166a00

Please sign in to comment.