Permalink
Browse files

added ensure_index for searches.default in searches

  • Loading branch information...
1 parent d95f282 commit ce8baea93fffd93de117c4f03d2d57fed9b9ad36 Adam Okoń committed Aug 17, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/hunt.rb
View
@@ -27,6 +27,7 @@ def search_keys
def searches(*keys)
# Using a hash to support multiple indexes per document at some point
key(:searches, Hash)
+ ensure_index :'searches.default'
@jnunemaker
jnunemaker Oct 5, 2011

I intentionally don't force this index as it might not be the one you want. If you are scoping search to user_id for example, you want a compound index and having this one is just cruft that never gets used.

@search_keys = keys
end

0 comments on commit ce8baea

Please sign in to comment.