All predicatesShow sourceelastic.pl -- Core Elastic search interface

This module is a thin layer over the Elastic REST interface. Eventually this should go into a pack.

Source es_get(+Path, -Result) is det
Source es_put(+Path, +Data) is det
Source es_post(+Path, +Data) is det
Source es_post(+Path, +Data, -Result) is det
Low level access to the Elastic HTTP service. Path is either an atom or a /-separated segment list, e.g., Index/'_doc'.
Arguments:
Result- is a JSON term represented as a dict.
Source es_add(+Index, +Data, -Reply, +Options) is det
Add a document to the index Index. Data is a Prolog dict to represent the document. This must satisfy the type as defined by es_create_index/2.
Source es_search(+Index, +Query, -Result) is det
Search using Query, returning a list of Prolog dicts that express the result.
Source es_create_index(+Index, +Mapping) is det
Source es_delete_index(+Index) is det
Create or delete an index. Note that deleting an index also deletes all its data.
Source es_url(+Path, -URL, -Options) is det[private]
Etablish the Elastic URL from Path and the options for connecting as required by http_open/3. The latter typically contains TLS authentication if this is used.
Source ok_reply(+Status, +Stream) is det[private]
Source reply(+Status, +Stream, -Reply) is det[private]
Handle the HTTP reply. Either succeed (2xx for ok_reply/2), return a Prolog dict with the JSON reply (2xx, for reply/3) or raise an exception holding with a Prolog dict holding the details.
Source path_segments(?Path, ?Segments) is det[private]
Convert between `a/b/c/... and 'a/b/c/...'`

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source es_get(+Path, -Result) is det
Source es_put(+Path, +Data) is det
Source es_post(+Path, +Data) is det
Source es_post(+Path, +Data, -Result) is det
Low level access to the Elastic HTTP service. Path is either an atom or a /-separated segment list, e.g., Index/'_doc'.
Arguments:
Result- is a JSON term represented as a dict.
Source es_get(+Path, -Result) is det
Source es_put(+Path, +Data) is det
Source es_post(+Path, +Data) is det
Source es_post(+Path, +Data, -Result) is det
Low level access to the Elastic HTTP service. Path is either an atom or a /-separated segment list, e.g., Index/'_doc'.
Arguments:
Result- is a JSON term represented as a dict.
Source es_get(+Path, -Result) is det
Source es_put(+Path, +Data) is det
Source es_post(+Path, +Data) is det
Source es_post(+Path, +Data, -Result) is det
Low level access to the Elastic HTTP service. Path is either an atom or a /-separated segment list, e.g., Index/'_doc'.
Arguments:
Result- is a JSON term represented as a dict.
Source es_create_index(+Index, +Mapping) is det
Source es_delete_index(+Index) is det
Create or delete an index. Note that deleting an index also deletes all its data.