Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Vendor.all do |document|
  2. attributes = document["raw_attributes"] || document
  3.  
  4. attributes.merge!(searchable: true)
  5.  
  6. Xo::Search::Message.store_in collection: "my-collection"
  7.  
  8. payload = Xo::Search::Message.new(attributes)
  9.  
  10. Xo::Search.index(payload)
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement