Class: Dina::Search
- Inherits:
-
BaseSearch
- Object
- BaseSearch
- Dina::Search
- Defined in:
- lib/dina/search/search.rb
Class Method Summary collapse
- .endpoint_path ⇒ Object
-
.execute(index:, payload: { query: { match_all: {} } }) ⇒ Object
index values: “agent”, “material_sample”, “object_store” payload is a hash in the form of an Elasticsearch body.
Methods inherited from BaseSearch
Class Method Details
.endpoint_path ⇒ Object
6 7 8 |
# File 'lib/dina/search/search.rb', line 6 def self.endpoint_path "search-api/search-ws/search" end |
.execute(index:, payload: { query: { match_all: {} } }) ⇒ Object
index values: “agent”, “material_sample”, “object_store” payload is a hash in the form of an Elasticsearch body
12 13 14 15 16 17 |
# File 'lib/dina/search/search.rb', line 12 def self.execute(index:, payload: { query: { match_all: {} } }) params = { indexName: index_name(index: index) } super(params.compact, method: :post, payload: payload)[:hits] end |