❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-java/tree/10.1.1
Manticore Search Client
-
API version: 10.1.1
-
Build date: 2026-07-15T16:42:02.673411249Z[Etc/UTC]
Building the API client library requires:
- Java 1.8+
- Maven/Gradle
| manticoresearch-java | Manticore Search | Compatibility |
|---|---|---|
dev |
dev (latest development version) |
✅ Fully Compatible |
| 10.1.1 or newer | 28.4.4 or newer | ✅ Fully Compatible |
| 10.0.0 to 10.1.1 | 28.4.4 or newer | |
| 10.0.0 to 10.1.0 | 17.5.1 to 28.4.4 | ✅ Fully Compatible |
| 10.0.0 to 10.1.0 | 9.2.14 to 17.5.1 | |
| 8.0.0 to 10.0.0 | 17.5.1 or newer | |
| 8.0.0 to 10.0.0 | 9.2.14 to 17.5.1 | ✅ Fully Compatible |
| 6.0.0 to 8.0.0 | 9.2.14 or newer | |
| 6.0.0 to 8.0.0 | 7.0.0 to 9.2.14 | ✅ Fully Compatible |
| 6.0.0 to 8.0.0 | 2.5.1 to 7.0.0 | |
| 5.0.0 to 6.0.0 | 6.3.6 to 7.0.0 | ✅ Fully Compatible |
| 5.0.0 to 6.0.0 | 2.5.1 to 6.3.6 | |
| 3.3.1 to 5.0.0 | 6.2.0 to 6.3.6 | ✅ Fully Compatible |
| 3.3.1 to 5.0.0 | 2.5.1 to 6.2.0 | |
| 2.0.2 to 3.3.1 | 2.5.1 to 6.2.0 | ✅ Fully Compatible |
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-dev</artifactId>
<version>10.1.1</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:10.1.1"
}At first generate the JAR by executing:
mvn clean packageThen manually install the following JARs:
target/manticoresearch-10.1.1.jartarget/lib/*.jar
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.*;
public class ApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://127.0.0.1:9308");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
IndexApi apiInstance = new IndexApi(defaultClient);
String body = "body_example"; // String |
# Perform insert and search operations
SearchApi searchApi = new SearchApi(client);
IndexApi indexApi = new IndexApi(client);
try {
String tableName = "products";
InsertDocumentRequest indexRequest = new InsertDocumentRequest();
HashMap<String,Object> doc = new HashMap<String,Object>();
indexRequest.index(tableName).id(1L).setDoc(doc);
indexApi.insert(indexRequest);
Highlight highlight = new Highlight();
List<String> highlightFields = new ArrayList<String>();
highlightFields.add("title");
highlight.setFields(highlightFields);
SearchQuery query = new SearchQuery();
query.setQueryString("@title Bag");
SearchRequest searchRequest = new SearchRequest();
searchRequest.index(tableName).query(query).setHighlight(highlight);
SearchResponse searchResponse = searchApi.search(searchRequest);
System.out.println(searchResponse);
} catch (ApiException e) {
System.err.println("Exception when calling Api function");
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 /bulk | Bulk table operations |
| IndexApi | delete | POST /delete | Delete a document in a table |
| IndexApi | insert | POST /insert | Create a new document in a table |
| IndexApi | partialReplace | POST /{table}/_update/{id} | Partially replaces a document in a table |
| IndexApi | replace | POST /replace | Replace new document in a table |
| IndexApi | update | POST /update | Update a document in a table |
| SearchApi | autocomplete | POST /autocomplete | Performs an autocomplete search on a table |
| SearchApi | percolate | POST /pq/{table}/search | Perform reverse search on a percolate table |
| SearchApi | search | POST /search | Performs a search on a table |
| UtilsApi | sql | POST /sql | Perform SQL requests |
| UtilsApi | token | POST /token | Create or rotate a bearer token |
- AggBucket
- AggBucketsResult
- AggComposite
- AggCompositeSource
- AggCompositeTerm
- AggDateHistogram
- AggHistogram
- AggMedianAbsoluteDeviation
- AggMetric
- AggPercentileRanks
- AggPercentiles
- AggRange
- AggTDigest
- AggTerms
- Aggregation
- AutocompleteRequest
- BoolFilter
- BulkResponse
- Chat
- DeleteDocumentRequest
- DeleteResponse
- ErrorResponse
- FacetBucketStatus
- FacetFilterMode
- FulltextFilter
- GeoDistance
- GeoDistanceLocationAnchor
- Highlight
- HighlightFieldOption
- HighlightFields
- HitsHits
- Hybrid
- InsertDocumentRequest
- Join
- JoinCond
- JoinOn
- Knn
- KnnQuery
- Match
- MatchAll
- PercolateRequest
- PercolateRequestQuery
- QueryFilter
- Range
- RangeFilter
- ReplaceDocumentRequest
- ResponseError
- ResponseErrorDetails
- ScriptField
- ScriptFieldScript
- SearchQuery
- SearchRequest
- SearchResponse
- SearchResponseHits
- SourceRules
- SqlObjResponse
- SqlResponse
- SuccessResponse
- UpdateDocumentRequest
- UpdateResponse
Authentication schemes defined for the API:
- Type: HTTP basic authentication
- Type: HTTP basic authentication
It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.