Class: Dina::SearchMapping

Inherits:
BaseSearch show all
Defined in:
lib/dina/search/search_mapping.rb

Class Method Summary collapse

Methods inherited from BaseSearch

endpoint, index_name, verify_ssl

Methods inherited from BaseModel

custom_headers, find_by_group, #initialize, properties, site

Constructor Details

This class inherits a constructor from Dina::BaseModel

Class Method Details

.endpoint_pathObject



6
7
8
# File 'lib/dina/search/search_mapping.rb', line 6

def self.endpoint_path
  "search-api/search-ws/mapping"
end

.execute(index:) ⇒ Hash

Return the search mapping document

Parameters:

  • index (String)

    the index, accepted value is one of “agent”, “material_sample”, “object_store”

Returns:

  • (Hash)

    the mapping document as a hash with symbolized keys



15
16
17
18
19
20
# File 'lib/dina/search/search_mapping.rb', line 15

def self.execute(index:)
  params = {
    indexName: index_name(index: index)
  }
  super(params.compact)
end