zincsearch-sdk 0.3.3
Zinc Search engine API
License: Apache 2.0
Requires Python: >=3.6
Keywords: OpenAPI,OpenAPI-Generator,Zinc Search engine API

# zincsearch-sdk
Zinc Search engine API documents https://docs.zincsearch.com

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.3.3
- Package version: 0.3.3
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://www.zincsearch.com](https://www.zincsearch.com)

## Requirements.

Python >=3.6

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/zinclabs/sdk-python-zincsearch.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/zinclabs/sdk-python-zincsearch.git`)

Then import the package:
```python
import zincsearch_sdk
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import zincsearch_sdk
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import time
import zincsearch_sdk
from pprint import pprint
from zincsearch_sdk.api import document
from zincsearch_sdk.model.meta_http_response_document import MetaHTTPResponseDocument
from zincsearch_sdk.model.meta_http_response_error import MetaHTTPResponseError
from zincsearch_sdk.model.meta_http_response_id import MetaHTTPResponseID
from zincsearch_sdk.model.meta_http_response_record_count import MetaHTTPResponseRecordCount
from zincsearch_sdk.model.meta_json_ingest import MetaJSONIngest
# Defining the host is optional and defaults to http://localhost:4080
# See configuration.py for a list of all supported configuration parameters.
configuration = zincsearch_sdk.Configuration(
    host = "http://localhost:4080"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = zincsearch_sdk.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)


# Enter a context with an instance of the API client
with zincsearch_sdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = document.Document(api_client)
    query = "query_example" # str | Query

    try:
        # Bulk documents
        api_response = api_instance.bulk(query)
        pprint(api_response)
    except zincsearch_sdk.ApiException as e:
        print("Exception when calling Document->bulk: %s\n" % e)
```

## Documentation for API Endpoints

All URIs are relative to *http://localhost:4080*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*Document* | [**bulk**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#bulk) | **POST** /api/_bulk | Bulk documents
*Document* | [**bulkv2**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#bulkv2) | **POST** /api/_bulkv2 | Bulkv2 documents
*Document* | [**delete**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#delete) | **DELETE** /api/{index}/_doc/{id} | Delete document
*Document* | [**es_bulk**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#es_bulk) | **POST** /es/_bulk | ES bulk documents
*Document* | [**index**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#index) | **POST** /api/{index}/_doc | Create or update document
*Document* | [**index_with_id**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#index_with_id) | **PUT** /api/{index}/_doc/{id} | Create or update document with id
*Document* | [**multi**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#multi) | **POST** /api/{index}/_multi | Multi documents
*Document* | [**update**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Document.md#update) | **POST** /api/{index}/_update/{id} | Update document with id
*Index* | [**add_or_remove_es_alias**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#add_or_remove_es_alias) | **POST** /es/_aliases | Add or remove index alias for compatible ES
*Index* | [**analyze**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#analyze) | **POST** /api/_analyze | Analyze
*Index* | [**analyze_index**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#analyze_index) | **POST** /api/{index}/_analyze | Analyze
*Index* | [**create**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#create) | **POST** /api/index | Create index
*Index* | [**create_template**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#create_template) | **POST** /es/_index_template | Create update index template
*Index* | [**delete**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#delete) | **DELETE** /api/index/{index} | Delete index
*Index* | [**delete_template**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#delete_template) | **DELETE** /es/_index_template/{name} | Delete template
*Index* | [**e_s_create_index**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#e_s_create_index) | **PUT** /es/{index} | Create index for compatible ES
*Index* | [**e_s_get_mapping**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#e_s_get_mapping) | **GET** /es/{index}/_mapping | Get index mappings for compatible ES
*Index* | [**es_exists**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#es_exists) | **HEAD** /es/{index} | Checks if the index exists for compatible ES
*Index* | [**exists**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#exists) | **HEAD** /api/index/{index} | Checks if the index exists
*Index* | [**get_es_aliases**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#get_es_aliases) | **GET** /es/{target}/_alias/{target_alias} | Get index alias for compatible ES
*Index* | [**get_index**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#get_index) | **GET** /api/index/{index} | Get index metadata
*Index* | [**get_mapping**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#get_mapping) | **GET** /api/{index}/_mapping | Get index mappings
*Index* | [**get_settings**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#get_settings) | **GET** /api/{index}/_settings | Get index settings
*Index* | [**get_template**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#get_template) | **GET** /es/_index_template/{name} | Get index template
*Index* | [**index_name_list**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#index_name_list) | **GET** /api/index_name | List index Name
*Index* | [**list**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#list) | **GET** /api/index | List indexes
*Index* | [**list_templates**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#list_templates) | **GET** /es/_index_template | List index teplates
*Index* | [**refresh**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#refresh) | **POST** /api/index/{index}/refresh | Resfresh index
*Index* | [**set_mapping**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#set_mapping) | **PUT** /api/{index}/_mapping | Set index mappings
*Index* | [**set_settings**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#set_settings) | **PUT** /api/{index}/_settings | Set index Settings
*Index* | [**update_template**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Index.md#update_template) | **PUT** /es/_index_template/{name} | Create update index template
*Search* | [**delete_by_query**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Search.md#delete_by_query) | **POST** /es/{index}/_delete_by_query | Searches the index and deletes all matched documents
*Search* | [**msearch**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Search.md#msearch) | **POST** /es/_msearch | Search V2 MultipleSearch for compatible ES
*Search* | [**search**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Search.md#search) | **POST** /es/{index}/_search | Search V2 DSL for compatible ES
*Search* | [**search_v1**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Search.md#search_v1) | **POST** /api/{index}/_search | Search V1
*User* | [**create**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/User.md#create) | **POST** /api/user | Create user
*User* | [**delete**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/User.md#delete) | **DELETE** /api/user/{id} | Delete user
*User* | [**list**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/User.md#list) | **GET** /api/user | List user
*User* | [**login**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/User.md#login) | **POST** /api/login | Login
*User* | [**update**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/User.md#update) | **PUT** /api/user | Update user
*Default* | [**healthz**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Default.md#healthz) | **GET** /healthz | Get healthz
*Default* | [**version**](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/Default.md#version) | **GET** /version | Get version


## Documentation For Models

 - [AggregationHistogramBound](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/AggregationHistogramBound.md)
 - [AuthLoginRequest](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/AuthLoginRequest.md)
 - [AuthLoginResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/AuthLoginResponse.md)
 - [AuthLoginUser](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/AuthLoginUser.md)
 - [IndexAnalyzeResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/IndexAnalyzeResponse.md)
 - [IndexAnalyzeResponseToken](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/IndexAnalyzeResponseToken.md)
 - [IndexIndexListResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/IndexIndexListResponse.md)
 - [MetaAggregationAutoDateHistogram](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationAutoDateHistogram.md)
 - [MetaAggregationDateHistogram](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationDateHistogram.md)
 - [MetaAggregationDateRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationDateRange.md)
 - [MetaAggregationHistogram](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationHistogram.md)
 - [MetaAggregationIPRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationIPRange.md)
 - [MetaAggregationMetric](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationMetric.md)
 - [MetaAggregationRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationRange.md)
 - [MetaAggregationResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationResponse.md)
 - [MetaAggregations](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregations.md)
 - [MetaAggregationsTerms](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAggregationsTerms.md)
 - [MetaAnalyzer](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaAnalyzer.md)
 - [MetaBoolQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaBoolQuery.md)
 - [MetaDateRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaDateRange.md)
 - [MetaExistsQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaExistsQuery.md)
 - [MetaFuzzyQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaFuzzyQuery.md)
 - [MetaHTTPResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponse.md)
 - [MetaHTTPResponseDeleteByQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseDeleteByQuery.md)
 - [MetaHTTPResponseDocument](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseDocument.md)
 - [MetaHTTPResponseError](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseError.md)
 - [MetaHTTPResponseID](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseID.md)
 - [MetaHTTPResponseIndex](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseIndex.md)
 - [MetaHTTPResponseRecordCount](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseRecordCount.md)
 - [MetaHTTPResponseTemplate](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHTTPResponseTemplate.md)
 - [MetaHealthzResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHealthzResponse.md)
 - [MetaHighlight](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHighlight.md)
 - [MetaHit](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHit.md)
 - [MetaHits](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHits.md)
 - [MetaHttpRetriesResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaHttpRetriesResponse.md)
 - [MetaIPRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIPRange.md)
 - [MetaIdsQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIdsQuery.md)
 - [MetaIndexAnalysis](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIndexAnalysis.md)
 - [MetaIndexSettings](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIndexSettings.md)
 - [MetaIndexSimple](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIndexSimple.md)
 - [MetaIndexTemplate](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaIndexTemplate.md)
 - [MetaJSONIngest](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaJSONIngest.md)
 - [MetaMappings](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMappings.md)
 - [MetaMatchBoolPrefixQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMatchBoolPrefixQuery.md)
 - [MetaMatchPhrasePrefixQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMatchPhrasePrefixQuery.md)
 - [MetaMatchPhraseQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMatchPhraseQuery.md)
 - [MetaMatchQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMatchQuery.md)
 - [MetaMultiMatchQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaMultiMatchQuery.md)
 - [MetaPage](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaPage.md)
 - [MetaPrefixQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaPrefixQuery.md)
 - [MetaProperty](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaProperty.md)
 - [MetaQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaQuery.md)
 - [MetaQueryStringQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaQueryStringQuery.md)
 - [MetaRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaRange.md)
 - [MetaRangeQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaRangeQuery.md)
 - [MetaRegexpQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaRegexpQuery.md)
 - [MetaSearchResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaSearchResponse.md)
 - [MetaShards](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaShards.md)
 - [MetaSimpleQueryStringQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaSimpleQueryStringQuery.md)
 - [MetaTemplate](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaTemplate.md)
 - [MetaTemplateTemplate](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaTemplateTemplate.md)
 - [MetaTermQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaTermQuery.md)
 - [MetaTotal](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaTotal.md)
 - [MetaUser](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaUser.md)
 - [MetaVersionResponse](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaVersionResponse.md)
 - [MetaWildcardQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaWildcardQuery.md)
 - [MetaZincQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/MetaZincQuery.md)
 - [V1AggregationDateRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/V1AggregationDateRange.md)
 - [V1AggregationNumberRange](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/V1AggregationNumberRange.md)
 - [V1AggregationParams](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/V1AggregationParams.md)
 - [V1QueryParams](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/V1QueryParams.md)
 - [V1ZincQuery](https://github.com/zinclabs/sdk-python-zincsearch/tree/main/docs/V1ZincQuery.md)


## Documentation For Authorization


## basicAuth

- **Type**: HTTP basic authentication


## Author




## Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in zincsearch_sdk.apis and zincsearch_sdk.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1:
Use specific imports for apis and models like:
- `from zincsearch_sdk.api.default_api import DefaultApi`
- `from zincsearch_sdk.model.pet import Pet`

Solution 2:
Before importing the package, adjust the maximum recursion limit as shown below:
```
import sys
sys.setrecursionlimit(1500)
import zincsearch_sdk
from zincsearch_sdk.apis import *
from zincsearch_sdk.models import *
```

    Zinc Search engine API documents https://docs.zincsearch.com  # noqa: E501