Class: Elastictastic::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/elastictastic/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#adapter ⇒ Object



15
16
17
# File 'lib/elastictastic/configuration.rb', line 15

def adapter
  @adapter ||= :net_http
end

#auto_refresh ⇒ Object



23
24
25
# File 'lib/elastictastic/configuration.rb', line 23

def auto_refresh
  !!@auto_refresh
end

#default_batch_size ⇒ Object



27
28
29
# File 'lib/elastictastic/configuration.rb', line 27

def default_batch_size
  @default_batch_size ||= 100
end

#default_index ⇒ Object



19
20
21
# File 'lib/elastictastic/configuration.rb', line 19

def default_index
  @default_index ||= 'default'
end

#hosts ⇒ Object



11
12
13
# File 'lib/elastictastic/configuration.rb', line 11

def hosts
  @hosts ||= ['http://localhost:9200']
end

#logger ⇒ Object

Returns the value of attribute logger.



5
6
7
# File 'lib/elastictastic/configuration.rb', line 5

def logger
  @logger
end

Instance Method Details

#host=(host) ⇒ Object



7
8
9
# File 'lib/elastictastic/configuration.rb', line 7

def host=(host)
  @hosts = [host]
end