Search Applications
- class elasticsearch.client.SearchApplicationClient
To use this client, access
client.search_applicationfrom anElasticsearchclient. For example:from elasticsearch import Elasticsearch # Create the client instance client = Elasticsearch(...) # Use the search_application client client.search_application.<method>(...)
- delete(*, name, error_trace=None, filter_path=None, human=None, pretty=None)
Delete a search application.
Remove a search application and its associated alias. Indices attached to the search application are not removed.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete
- Parameters:
name (str) – The name of the search application to delete.
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- delete_behavioral_analytics(*, name, error_trace=None, filter_path=None, human=None, pretty=None)
Delete a behavioral analytics collection. The associated data stream is also deleted.
- Parameters:
name (str) – The name of the analytics collection to be deleted
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- get(*, name, error_trace=None, filter_path=None, human=None, pretty=None)
Get search application details.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get
- Parameters:
name (str) – The name of the search application
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- get_behavioral_analytics(*, name=None, error_trace=None, filter_path=None, human=None, pretty=None)
Get behavioral analytics collections.
- Parameters:
name (Sequence[str] | None) – A list of analytics collections to limit the returned information
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- list(*, error_trace=None, filter_path=None, from_=None, human=None, pretty=None, q=None, size=None)
Get search applications. Get information about search applications.
- Parameters:
from – Starting offset.
q (str | None) – Query in the Lucene query string syntax.
size (int | None) – Specifies a max number of results to get.
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
from_ (int | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- post_behavioral_analytics_event(*, collection_name, event_type, payload=None, body=None, debug=None, error_trace=None, filter_path=None, human=None, pretty=None)
Create a behavioral analytics collection event.
- Parameters:
collection_name (str) – The name of the behavioral analytics collection.
event_type (str | Literal['page_view', 'search', 'search_click']) – The analytics event type.
payload (Any | None)
debug (bool | None) – Whether the response type has to include more details
body (Any | None)
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- put(*, name, search_application=None, body=None, create=None, error_trace=None, filter_path=None, human=None, pretty=None)
Create or update a search application.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put
- Parameters:
name (str) – The name of the search application to be created or updated.
search_application (Mapping[str, Any] | None)
create (bool | None) – If true, this request cannot replace or update existing Search Applications.
body (Mapping[str, Any] | None)
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- put_behavioral_analytics(*, name, error_trace=None, filter_path=None, human=None, pretty=None)
Create a behavioral analytics collection.
- Parameters:
name (str) – The name of the analytics collection to be created or updated.
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
- Return type:
ObjectApiResponse[Any]
- render_query(*, name, error_trace=None, filter_path=None, human=None, params=None, pretty=None, body=None)
Render a search application query. Generate an Elasticsearch query using the specified query parameters and the search template associated with the search application or a default template if none is specified. If a parameter used in the search template is not specified in
params, the parameter's default value will be used. The API returns the specific Elasticsearch query that would be generated and run by calling the search application search API.You must have
readprivileges on the backing alias of the search application.- Parameters:
name (str) – The name of the search application to render teh query for.
params (Mapping[str, Any] | None)
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
body (Dict[str, Any] | None)
- Return type:
ObjectApiResponse[Any]
- search(*, name, error_trace=None, filter_path=None, human=None, params=None, pretty=None, typed_keys=None, body=None)
Run a search application search. Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable.
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search
- Parameters:
name (str) – The name of the search application to be searched.
params (Mapping[str, Any] | None) – Query parameters specific to this request, which will override any defaults specified in the template.
typed_keys (bool | None) – Determines whether aggregation names are prefixed by their respective types in the response.
error_trace (bool | None)
filter_path (str | Sequence[str] | None)
human (bool | None)
pretty (bool | None)
body (Dict[str, Any] | None)
- Return type:
ObjectApiResponse[Any]