Skip to content

Commit a10e7f6

Browse files
committed
Regenerated the client
1 parent 1a3f64a commit a10e7f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+466
-1008
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,3 @@ jobs:
4848
echo "$PRIVATEKEY" > ~/key
4949
gpg2 --import --batch ~/key
5050
echo "verify"
51-
mvn install -Dmaven.test.skip.exec=true -DskipTests=true -Dmaven.test.skip=true -Dgpg.passphrase=$GPGKEY
52-
echo "deploy"
53-
mvn clean deploy -e -X

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Manticore Search Client
66

7-
- API version: 5.0.0
7+
- API version: 6.0.0
88

9-
- Build date: 2024-10-28T07:04:51.268969530Z[Etc/UTC]
9+
- Build date: 2024-10-28T12:56:08.804080940Z[Etc/UTC]
1010

1111
Сlient for Manticore Search.
1212

@@ -20,6 +20,7 @@ Building the API client library requires:
2020

2121
| Manticore Search | manticoresearch-java |
2222
| ----------------- | ----------------------- |
23+
| dev | dev |
2324
| >= 6.3.6 | >= 5.0.x |
2425
| >= 6.2.0 | >= 3.3.1 |
2526
| >= 2.5.1 | >= 2.0.2 |
@@ -48,7 +49,7 @@ Add this dependency to your project's POM:
4849
<dependency>
4950
<groupId>com.manticoresearch</groupId>
5051
<artifactId>manticoresearch</artifactId>
51-
<version>5.0.0</version>
52+
<version>6.0.0</version>
5253
<scope>compile</scope>
5354
</dependency>
5455
```
@@ -64,7 +65,7 @@ Add this dependency to your project's build file:
6465
}
6566
6667
dependencies {
67-
implementation "com.manticoresearch:manticoresearch:5.0.0"
68+
implementation "com.manticoresearch:manticoresearch:6.0.0"
6869
}
6970
```
7071

@@ -78,7 +79,7 @@ mvn clean package
7879

7980
Then manually install the following JARs:
8081

81-
- `target/manticoresearch-5.0.0.jar`
82+
- `target/manticoresearch-6.0.0.jar`
8283
- `target/lib/*.jar`
8384

8485
## Getting Started
@@ -100,34 +101,33 @@ public class ApiExample {
100101

101102
IndexApi apiInstance = new IndexApi(defaultClient);
102103
String body = "body_example"; // String |
103-
try {
104-
BulkResponse result = apiInstance.bulk(body);
105-
System.out.println(result);
106-
} catch (ApiException e) {
107-
System.err.println("Exception when calling IndexApi#bulk");
108-
System.err.println("Status code: " + e.getCode());
109-
System.err.println("Reason: " + e.getResponseBody());
110-
System.err.println("Response headers: " + e.getResponseHeaders());
111-
e.printStackTrace();
112-
}
113-
104+
105+
# Perform insert and search operations
114106
SearchApi searchApi = new SearchApi(client);
107+
IndexApi indexApi = new IndexApi(client);
115108
try {
116-
// Create SearchRequest
117-
BasicSearchRequest basicSearchRequest = new BasicSearchRequest();
118-
basicSearchRequest.setIndex("test");
109+
String tableName = "products";
110+
111+
InsertDocumentRequest indexRequest = new InsertDocumentRequest();
112+
HashMap<String,Object> doc = new HashMap<String,Object>();
113+
indexRequest.index(tableName).id(1L).setDoc(doc);
114+
indexApi.insert(indexRequest);
115+
116+
Highlight highlight = new Highlight();
117+
List<String> highlightFields = new ArrayList<String>();
118+
highlightFields.add("title");
119+
highlight.setFields(highlightFields);
119120

120-
QueryStringFilter queryStringFilter = new QueryStringFilter();
121-
queryStringFilter.setQueryString("Title 1");
122-
basicSearchRequest.setQuery(new QueryFilter( new FulltextFilter(queryStringFilter) ));
121+
SearchQuery query = new SearchQuery();
122+
query.setQueryString("@title Bag");
123123

124-
SearchRequest searchRequest = new SearchRequest(basicSearchRequest);
125-
126-
// Perform a search
124+
SearchRequest searchRequest = new SearchRequest();
125+
searchRequest.index(tableName).query(query).setHighlight(highlight);
126+
127127
SearchResponse searchResponse = searchApi.search(searchRequest);
128-
System.out.println( searchResponse.toString() );
128+
System.out.println(searchResponse);
129129
} catch (ApiException e) {
130-
System.err.println("Exception when calling SearchApi#search");
130+
System.err.println("Exception when calling Api function");
131131
System.err.println("Status code: " + e.getCode());
132132
System.err.println("Reason: " + e.getResponseBody());
133133
System.err.println("Response headers: " + e.getResponseHeaders());

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'eclipse'
33
apply plugin: 'com.diffplug.spotless'
44

55
group = 'com.manticoresearch'
6-
version = '5.0.0'
6+
version = '6.0.0'
77

88
buildscript {
99
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.manticoresearch",
44
name := "manticoresearch",
5-
version := "5.0.0",
5+
version := "6.0.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
Compile / javacOptions ++= Seq("-Xlint:deprecation"),

0 commit comments

Comments
 (0)