Class: SearchRequest

Inherits:
Object
  • Object
show all
Includes:
AttributesReader
Defined in:
lib/search_request.rb

Instance Method Summary collapse

Methods included from AttributesReader

#attributes

Constructor Details

#initializeSearchRequest

Returns a new instance of SearchRequest.



4
5
6
7
# File 'lib/search_request.rb', line 4

def initialize
  @index = ''
  @body = nil
end

Instance Method Details

#bodyObject



9
10
11
# File 'lib/search_request.rb', line 9

def body
  return @source.body
end

#index(index) ⇒ Object

sets index



18
19
20
21
# File 'lib/search_request.rb', line 18

def index index
  @index= index
  return self
end

#index_exprObject

returns index



14
15
16
# File 'lib/search_request.rb', line 14

def index_expr
  return @index
end

#source(source) ⇒ Object

sets source



28
29
30
31
# File 'lib/search_request.rb', line 28

def source source
  @source = source
  return self
end

#source_exprObject

returns source



24
25
26
# File 'lib/search_request.rb', line 24

def source_expr
  return @body
end