class

LuckySearch::Client

Inherits Habitat::SettingsHelpers < Habitat::TempConfig < Reference < Object

borrowed from Neuroplastic - thank you Place Labs

Constants

HABITAT_SETTINGS = [{decl: uri : URI | ::Nil = (Client.env_with_deprecation("ELASTIC_URI", "ES_URI")).try(&->URI.parse(String)), example: nil, validation: nil}, {decl: host : String = (Client.env_with_deprecation("ELASTIC_HOST", "ES_HOST")) || "127.0.0.1", example: nil, validation: nil}, {decl: port : Int32 = (Client.env_with_deprecation("ELASTIC_PORT", "ES_PORT")).try(&.to_i) || 9200, example: nil, validation: nil}, {decl: tls : Bool = (Client.env_with_deprecation("ELASTIC_TLS", "ES_TLS")) == "true", example: nil, validation: nil}, {decl: pooled : Bool = (Client.env_with_deprecation("ELASTIC_POOLED", "ES_POOLED")) == "true", example: nil, validation: nil}, {decl: pool_size : Int32 = (Client.env_with_deprecation("ELASTIC_CONN_POOL", "ES_CONN_POOL")).try(&.to_i) || NUM_INDICES, example: nil, validation: nil}, {decl: idle_pool_size : Int32 = (Client.env_with_deprecation("ELASTIC_IDLE_POOL", "ES_IDLE_POOL")).try(&.to_i) || (NUM_INDICES // 4), example: nil, validation: nil}, {decl: pool_timeout : Float64 = (Client.env_with_deprecation("ELASTIC_CONN_POOL_TIMEOUT", "ES_CONN_POOL_TIMEOUT")).try(&.to_f64) || 5.0, example: nil, validation: nil}] of Nil
NUM_INDICES = 10

Class methods

configure
Source
settings
Source

Instance methods

count(arguments = {} of Symbol => String)
Source
create(index, body)
Source
create_index(index, body)
Source
delete(index, id)
Source
delete_index(index)
Source
empty_indices(indices : Array(String) | Nil = nil)
Source
exists?(index, id) : Bool
Source
get(index, id)
Source
index_exists?(index) : Bool
Source
perform_request(method, path, params = nil, body = nil) : JSON::Any
Source
perform_request_bool(method, path, params = nil, body = nil) : Bool
Source
refresh(index)
Source
search(arguments = {} of Symbol => String) : JSON::Any
Source
settings
Source
update(index, id, body)
Source

Nested types