Method: Esse::Search::Query#initialize

Defined in:
lib/esse/search/query.rb

#initialize(transport, *indices, suffix: nil, **definition, &_block) ⇒ Query

Returns a new instance of Query.

Parameters:

  • transport (Esse::Transport)

    The client proxy to use for the query

  • indices (<Array<Esse::Index, String>] The class of the index to search or the index name)

    ndices [<Array<Esse::Index, String>] The class of the index to search or the index name

  • definition (Hash)

    The options to pass to the search.



13
14
15
16
17
# File 'lib/esse/search/query.rb', line 13

def initialize(transport, *indices, suffix: nil, **definition, &_block)
  @transport = transport
  @definition = definition
  @definition[:index] = self.class.normalize_indices(*indices, suffix: suffix) if indices.size > 0
end