8000 GitHub - ProjectAMPLE/python-client-draft
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ProjectAMPLE/python-client-draft

 
 

Repository files navigation

manticoresearch

Low-level client for Manticore Search.

❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-python/tree/2.2.0

Requirements.

Python 2.7 and 3.4+.

Minimum Manticore Search version is > 2.5.1 with HTTP protocol enabled.

Manticore Search manticoresearch-python Python
>= 4.2.1 2.0.x >= 3.4
>= 4.0.2 < 4.2.1 1.0.6 >= 3.4
>= 2.5.1 < 4.0.2 1.0.5 >= 2.7

Installation & Usage

pip install

Install the manticoresearch package with pip

pip install manticoresearch

Then import the package:

import manticoresearch

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import manticoresearch

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import manticoresearch
from manticoresearch import *
from manticoresearch.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://127.0.0.1:9308
# See configuration.py for a list of all supported configuration parameters.
configuration = manticoresearch.Configuration(
    host = "http://127.0.0.1:9308"
)



# Enter a context with an instance of the API client
with manticoresearch.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = manticoresearch.IndexApi(api_client)
    body = "["'{\"insert\": {\"index\": \"test\", \"id\": 1, \"doc\": {\"title\": \"Title 1\"}}},\\n{\"insert\": {\"index\": \"test\", \"id\": 2, \"doc\": {\"title\": \"Title 2\"}}}'"]" # str | 

    try:
        # Bulk index operations
        api_response = api_instance.bulk(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling IndexApi->bulk: %s\n" % e)
    

Documentation

Full documentation is available in docs folder.

Manticore Search server documentation: https://manual.manticoresearch.com.

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:9308

Class Method HTTP request Description
IndexApi bulk POST /json/bulk Bulk index operations
IndexApi delete POST /json/delete Delete a document in an index
IndexApi insert POST /json/insert Create a new document in an index
IndexApi replace POST /json/replace Replace new document in an index
IndexApi update POST /json/update Update a document in an index
SearchApi percolate POST /json/pq/{index}/search Perform reverse search on a percolate index
SearchApi search POST /json/search Performs a search
UtilsApi sql POST /sql Perform SQL requests

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

info@manticoresearch.com

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Shell 0.4%
0