❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-java/tree/3.3.0
Manticore Search Client
- 
API version: 3.3.0
 - 
Build date: 2023-04-19T16:54:33.962336Z[Etc/UTC]
 
Low-level client for Manticore Search.
For more information, please visit https://manticoresearch.com/contact-us/
Automatically generated by the OpenAPI Generator
Building the API client library requires:
- Java 1.8+
 - Maven (3.8.3+)/Gradle (7.2+)
 
To install the API client library to your local Maven repository, simply execute:
mvn clean installTo deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deployRefer to the OSSRH Guide for more information.
Add this dependency to your project's POM:
<dependency>
  <groupId>com.manticoresearch</groupId>
  <artifactId>manticoresearch</artifactId>
  <version>3.3.0</version>
  <scope>compile</scope>
</dependency>Add this dependency to your project's build file:
  repositories {
    mavenCentral()     // Needed if the 'manticoresearch' jar has been published to maven central.
    mavenLocal()       // Needed if the 'manticoresearch' jar has been published to the local maven repo.
  }
  dependencies {
     implementation "com.manticoresearch:manticoresearch:3.3.0"
  }At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/manticoresearch-3.3.0.jartarget/lib/*.jar
To add a HTTP proxy for the API client, use ClientConfig:
import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import com.manticoresearch.client.*;
import com.manticoresearch.client.api.IndexApi;
...
ApiClient defaultClient = Configuration.getDefaultApiClient();
ClientConfig clientConfig = defaultClient.getClientConfig();
clientConfig.connectorProvider(new ApacheConnectorProvider());
clientConfig.property(ClientProperties.PROXY_URI, "http://proxy_url_here");
clientConfig.property(ClientProperties.PROXY_USERNAME, "proxy_username");
clientConfig.property(ClientProperties.PROXY_PASSWORD, "proxy_password");
defaultClient.setClientConfig(clientConfig);
IndexApi apiInstance = new IndexApi(defaultClient);Please follow the installation instruction and execute the following Java code:
import com.manticoresearch.client.*;
import com.manticoresearch.client.auth.*;
import com.manticoresearch.client.model.*;
import com.manticoresearch.client.api.IndexApi;
public class IndexApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("http://127.0.0.1:9308");
        
        IndexApi apiInstance = new IndexApi(defaultClient);
        String body = ["'{\"insert\": {\"index\": \"test\", \"id\": 1, \"doc\": {\"title\": \"Title 1\"}}},\\n{\"insert\": {\"index\": \"test\", \"id\": 2, \"doc\": {\"title\": \"Title 2\"}}}'"]; // String | 
        try {
            BulkResponse result = apiInstance.bulk(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IndexApi#bulk");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}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 | 
- Aggregation
 - BoolFilter
 - BulkResponse
 - DeleteDocumentRequest
 - DeleteResponse
 - EqualsFilter
 - ErrorResponse
 - Facet
 - FilterBoolean
 - FilterNumber
 - FilterString
 - GeoDistanceFilter
 - GeoDistanceFilterLocationAnchor
 - Highlight
 - HighlightField
 - InFilter
 - InsertDocumentRequest
 - MatchFilter
 - MatchOp
 - MatchOpFilter
 - MatchPhraseFilter
 - NotFilterBoolean
 - NotFilterNumber
 - NotFilterString
 - PercolateRequest
 - PercolateRequestQuery
 - QueryFilter
 - RangeFilter
 - SearchRequest
 - SearchResponse
 - SearchResponseHits
 - SortMVA
 - SortMultiple
 - SortOrder
 - SourceByRules
 - SuccessResponse
 - UpdateDocumentRequest
 - UpdateResponse
 
All endpoints do not require authorization. Authentication schemes defined for the API:
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.