tests.system.opensearch.example_opensearch
¶
Module Contents¶
Classes¶
Model-like class for persisting documents in opensearch. |
Functions¶
Attributes¶
- class tests.system.opensearch.example_opensearch.LogDocument(meta=None, **kwargs)[source]¶
Bases:
opensearchpy.helpers.document.Document
Model-like class for persisting documents in opensearch.
- save(**kwargs)[source]¶
Save the document into opensearch. If the document doesn’t exist it is created, it is overwritten otherwise. Returns
True
if this operations resulted in new document being created.- Parameters
index – opensearch index to use, if the
Document
is associated with an index this can be omitted.using – connection alias to use, defaults to
'default'
validate – set to
False
to skip validating the documentskip_empty – if set to
False
will cause empty values (None
,[]
,{}
) to be left on the document. Those values will be stripped out otherwise as they make no difference in opensearch.return_doc_meta – set to
True
to return all metadata from the update API call instead of only the operation result
Any additional keyword arguments will be passed to
OpenSearch.index
unchanged.:return operation result created/updated