class LuckySearch::Client
- LuckySearch::Client
- Reference
- Object
Overview
borrowed from Neuroplastic - thank you Place Labs
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
Defined in:
lucky_search/client.crConstant Summary
-
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 Method Summary
Instance Method Summary
- #count(arguments = {} of Symbol => String)
- #create(index, body)
- #create_index(index, body)
- #delete(index, id)
- #delete_index(index)
- #empty_indices(indices : Array(String)? = nil)
- #exists?(index, id) : Bool
- #get(index, id)
- #index_exists?(index) : Bool
- #perform_request(method, path, params = nil, body = nil) : JSON::Any
- #perform_request_bool(method, path, params = nil, body = nil) : Bool
- #refresh(index)
- #search(arguments = {} of Symbol => String) : JSON::Any
- #settings
- #update(index, id, body)