Method: SearchFlip::Index::ClassMethods#index_options

Defined in:
lib/search_flip/index.rb

#index_options(record) ⇒ Hash

Override this method to automatically pass index options for a record at index-time, like routing or versioning.

Examples:

def self.index_options(comment)
  {
    routing: comment.user_id,
    version: comment.version,
    version_type: "external_gte"
  }
end

Parameters:

  • record

    The record that gets indexed

Returns:

  • (Hash)

    The index options



68
69
70
# File 'lib/search_flip/index.rb', line 68

def index_options(record)
  {}
end