Class: Dina::SearchCount
- Inherits:
-
BaseSearch
- Object
- BaseSearch
- Dina::SearchCount
- Defined in:
- lib/dina/search/search_count.rb
Class Method Summary collapse
- .endpoint_path ⇒ Object
-
.execute(index:, payload: {}) ⇒ Object
index values: “agent”, “material_sample”, “object_store” Payload is a has like: {bool: {filter: {term: {“data.attributes.group”: “dao”}}}}.
Methods inherited from BaseSearch
Class Method Details
.endpoint_path ⇒ Object
6 7 8 |
# File 'lib/dina/search/search_count.rb', line 6 def self.endpoint_path "search-api/search-ws/count" end |
.execute(index:, payload: {}) ⇒ Object
index values: “agent”, “material_sample”, “object_store” Payload is a has like: {bool: {filter: {term: {“data.attributes.group”: “dao”}}}}
12 13 14 15 16 17 |
# File 'lib/dina/search/search_count.rb', line 12 def self.execute(index:, payload: {}) params = { indexName: index_name(index: index) } super(params.compact, method: :post, payload: payload)[:count] end |