class GdsApi::Rummager

def add_document(type, id, document)

Other tags:
    See: https://github.com/alphagov/rummager/blob/master/docs/documents.md -

Returns:
  • (GdsApi::Response) - A status code of 202 indicates the document has been successfully queued.

Parameters:
  • document (Hash) -- The document to add. Must match the rummager schema matchin the `type` parameter and contain a `link` field.
  • id (String) -- The rummager/elasticsearch id. Typically the same as the `link` field, but this is not strictly enforced.
  • type (String) -- The rummager/elasticsearch document type.
def add_document(type, id, document)
  post_json(
    documents_url,
    document.merge(
      _type: type,
      _id: id,
    )
  )
end