$darkmode
This class exposes ElasticSearch indices as record-based data providers. More...
Public Member Functions | |
constructor (RestClient::RestClient rest, string name, hash< auto > index) | |
Creates the object from a REST connection. | |
*string | getDesc () |
Returns the data provider description. | |
string | getName () |
Returns the data provider name. | |
hash< DataProvider::DataProviderInfo > | getStaticInfoImpl () |
Returns data provider static info. | |
DataProvider::AbstractDataProviderType | getTypeForProperty (string name, hash< auto > prop) |
Returns a data type for a property. | |
![]() | |
constructor () | |
Creates the object. | |
constructor (RestClient rest) | |
Creates the object from a REST connection. | |
setLogger (*LoggerInterface logger) | |
Accepts a LoggerInterface object for logging (or clears it) | |
Static Public Member Functions | |
static string | getQueryOptions (string uri, hash< auto > search_options, list< string > query_args) |
Returns a URI path with query options. | |
Public Attributes | |
hash< auto > | index |
Index hash. | |
string | name |
Current index name. | |
const | ProviderInfo |
Provider info. | |
const | ProviderSummaryInfo |
Provider summary info. | |
const | SearchQueryOptions = ("timeout",) |
Search query options. | |
const | TypeMap |
ElasticSearch property types to data types. | |
Protected Member Functions | |
*hash< auto > | createRecordImpl (hash< auto > rec, *hash< auto > create_options) |
Writes the given record to the data provider. More... | |
int | deleteRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options) |
string | getDocUriPath (string uri_str, *hash< auto > where_cond, string action, *hash< auto > search_options, *list< string > query_args) |
Makes sure that the where_cond is only the _id field. | |
getRecordInfoIntern () | |
Retrieves the record type. | |
DataProvider::AbstractDataProviderRecordIterator | searchRecordsImpl (*hash< auto > where_cond, *hash< auto > search_options) |
Returns an iterator for zero or more records matching the search options. More... | |
int | updateRecordsImpl (hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options) |
Updates a single document in the index. More... | |
Protected Attributes | |
hash< string, AbstractDataField > | record_type |
The record type for the object. | |
This class exposes ElasticSearch indices as record-based data providers.
The record type is made up of the document attributes plus the following read-only fields:
_id:
the document ID which functions as the data provider record ID_score:
the score returned from searchesNote that "where hashes" for updates and deletes accept a single field, _id
, to identify the single document (data provider record) to be updated or deleted.
Searches are performed with match
logic; for more flexible searching, use the index search API data provider found at index/search
|
protected |
Writes the given record to the data provider.
rec | a hash representing a single input record |
create_options | the create options (see CreateOptions) after processing by validateCreateOptions() |
|
protected |
where_cond | a hash for identifying the record(s) to be deleted; can only contain the "_id" field |
search_options | the search options (see SearchOptions) after processing by validateSearchOptions(); ignored for this API call |
INVALID-OPERATION | the data provider does not support record updating |
|
protected |
Returns an iterator for zero or more records matching the search options.
where_cond | the search criteria |
search_options | the search options after processing by validateSearchOptions() |
|
protected |
Updates a single document in the index.
set | the hash of field data to set |
where_cond | a hash for identifying the record(s) to be updated |
search_options | the search options (see SearchOptions) after processing by validateSearchOptions() |