                            ; This will be used to store the id's of users who
                            ; have completed training with this phrase.
                            :users []
+                           :usersCount 0
                            :random_point [(rand) 0]}) phrases)))
 
 (defn identity

(defn add-trained-user-to-phrase
  "Adds the given user-id to the array of users for the given phrase."
  [user-id phrase-id]
  (mc/update-by-id "phrases" phrase-id {$addToSet {:users user-id}}))

(defn add-phrases
  "Batch inserts phrases to be used for training and auth."

                               :user_id 1
                               :random_point "2d"})
  (mc/ensure-index "phrases" {:random_point "2d", :users 1})
  (mc/ensure-index "phrases" {:usersCount 1})
  (mc/ensure-index "phrases" {:phrase-id 1})
  (mc/ensure-index "phrases" {:phrase 1} {:unique 1 :dropDups 1})
  (mc/ensure-index "classifiers" {:user_id 1
