Skip to content

Commit

Permalink
added ensure_index for searches.default in searches
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Okoń committed Aug 17, 2011
1 parent d95f282 commit ce8baea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/hunt.rb
Expand Up @@ -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'

This comment has been minimized.

Copy link
@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

Expand Down

0 comments on commit ce8baea

Please sign in to comment.