Skip to content

Commit

Permalink
Regenerated the client
Browse files Browse the repository at this point in the history
  • Loading branch information
nick committed Oct 28, 2024
1 parent 1a3f64a commit a10e7f6
Show file tree
Hide file tree
Showing 65 changed files with 466 additions and 1,008 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ jobs:
echo "$PRIVATEKEY" > ~/key
gpg2 --import --batch ~/key
echo "verify"
mvn install -Dmaven.test.skip.exec=true -DskipTests=true -Dmaven.test.skip=true -Dgpg.passphrase=$GPGKEY
echo "deploy"
mvn clean deploy -e -X
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

Manticore Search Client

- API version: 5.0.0
- API version: 6.0.0

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

Сlient for Manticore Search.

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

| Manticore Search | manticoresearch-java |
| ----------------- | ----------------------- |
| dev | dev |
| >= 6.3.6 | >= 5.0.x |
| >= 6.2.0 | >= 3.3.1 |
| >= 2.5.1 | >= 2.0.2 |
Expand Down Expand Up @@ -48,7 +49,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.manticoresearch</groupId>
<artifactId>manticoresearch</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -64,7 +65,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.manticoresearch:manticoresearch:5.0.0"
implementation "com.manticoresearch:manticoresearch:6.0.0"
}
```

Expand All @@ -78,7 +79,7 @@ mvn clean package

Then manually install the following JARs:

- `target/manticoresearch-5.0.0.jar`
- `target/manticoresearch-6.0.0.jar`
- `target/lib/*.jar`

## Getting Started
Expand All @@ -100,34 +101,33 @@ public class ApiExample {

IndexApi apiInstance = new IndexApi(defaultClient);
String body = "body_example"; // 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();
}


# Perform insert and search operations
SearchApi searchApi = new SearchApi(client);
IndexApi indexApi = new IndexApi(client);
try {
// Create SearchRequest
BasicSearchRequest basicSearchRequest = new BasicSearchRequest();
basicSearchRequest.setIndex("test");
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);

QueryStringFilter queryStringFilter = new QueryStringFilter();
queryStringFilter.setQueryString("Title 1");
basicSearchRequest.setQuery(new QueryFilter( new FulltextFilter(queryStringFilter) ));
SearchQuery query = new SearchQuery();
query.setQueryString("@title Bag");

SearchRequest searchRequest = new SearchRequest(basicSearchRequest);

// Perform a search
SearchRequest searchRequest = new SearchRequest();
searchRequest.index(tableName).query(query).setHighlight(highlight);
SearchResponse searchResponse = searchApi.search(searchRequest);
System.out.println( searchResponse.toString() );
System.out.println(searchResponse);
} catch (ApiException e) {
System.err.println("Exception when calling SearchApi#search");
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());
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'com.diffplug.spotless'

group = 'com.manticoresearch'
version = '5.0.0'
version = '6.0.0'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.manticoresearch",
name := "manticoresearch",
version := "5.0.0",
version := "6.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
Compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
Loading

0 comments on commit a10e7f6

Please sign in to comment.