Commit 4f6c182d1eaf00521bbf4a5fa26dc5363851efc5
1 parent
a072133b
Exists in
master
and in
19 other branches
Removed id and _id from search data by default
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick/model.rb
... | ... | @@ -133,7 +133,7 @@ module Searchkick |
133 | 133 | end unless method_defined?(:similar) |
134 | 134 | |
135 | 135 | def search_data |
136 | - respond_to?(:to_hash) ? to_hash : serializable_hash | |
136 | + (respond_to?(:to_hash) ? to_hash : serializable_hash).except("id", "_id") | |
137 | 137 | end unless method_defined?(:search_data) |
138 | 138 | |
139 | 139 | def should_index? | ... | ... |