Class: Noiseless::Adapters::Postgresql::IndicesAPI
- Inherits:
-
Object
- Object
- Noiseless::Adapters::Postgresql::IndicesAPI
- Defined in:
- lib/noiseless/adapters/postgresql.rb
Instance Method Summary collapse
- #get(index:) ⇒ Object
-
#initialize(adapter) ⇒ IndicesAPI
constructor
A new instance of IndicesAPI.
-
#refresh(index:) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument.
- #stats(index:) ⇒ Object
Constructor Details
#initialize(adapter) ⇒ IndicesAPI
Returns a new instance of IndicesAPI.
102 103 104 |
# File 'lib/noiseless/adapters/postgresql.rb', line 102 def initialize(adapter) @adapter = adapter end |
Instance Method Details
#get(index:) ⇒ Object
106 107 108 109 |
# File 'lib/noiseless/adapters/postgresql.rb', line 106 def get(index:) # Return table info as index info { index => { "mappings" => {}, "settings" => {} } } end |
#refresh(index:) ⇒ Object
rubocop:disable Lint/UnusedMethodArgument
115 116 117 118 |
# File 'lib/noiseless/adapters/postgresql.rb', line 115 def refresh(index:) # rubocop:disable Lint/UnusedMethodArgument # No-op for PostgreSQL - queries always see latest data { "_shards" => { "total" => 1, "successful" => 1, "failed" => 0 } } end |
#stats(index:) ⇒ Object
111 112 113 |
# File 'lib/noiseless/adapters/postgresql.rb', line 111 def stats(index:) { "indices" => { index => {} } } end |