GithubHelp home page GithubHelp logo

junghoon-vans / spring-data-meilisearch Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 317 KB

Provide support to increase developer productivity in Java when using Meilisearch. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.

Home Page: https://junghoon-vans.github.io/spring-data-meilisearch/

License: Apache License 2.0

Java 100.00%
java meilisearch spring-data spring ddd framework

spring-data-meilisearch's Introduction

Spring Data for Meilisearch

Maven Central Maintainability Rating Coverage License

The Spring Data Meilisearch project provides integration with the Meilisearch search engine.

Features

  • Spring Configuration support using Java based @Configuration classes or an XML namespace for the Meilisearch client.

  • Implementation of CRUD methods for Meilisearch Documents.

Getting Started

Here is a quick teaser of an application using Spring Data Repositories in Java:

public interface MovieRepository extends CrudRepository<Movie, Integer> { }

@Service
public class MyService {

    @Autowired private MovieRepository repository;

    public void doWork(Movie movie) {
        repository.save(movie);
    }
}

@Configuration
@EnableMeilisearchRepositories
public class Config extends MeilisearchConfiguration {

    @Override
    public ClientConfiguration clientConfiguration() {
        return ClientConfiguration.builder()
                .connectedToLocalhost()
                .withApiKey("masterKey")
                .build();
    }
}

Maven configuration

Add the Maven dependency:

<dependency>
  <groupId>io.vanslog</groupId>
  <artifactId>spring-data-meilisearch</artifactId>
  <version>${version}</version>
</dependency>

If you’d rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.

<dependency>
    <groupId>io.vanslog</groupId>
    <artifactId>spring-data-meilisearch</artifactId>
    <version>${version}-SNAPSHOT</version>
</dependency>

<repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshot Repository</name>
    <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

Guide

Reporting Issues

Spring Data uses GitHub as issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:

  • Before you log a bug, please search the issue tracker to see if someone has already reported the problem.

  • If the issue doesn’t already exist, create a new issue.

  • Please provide as much information as possible with the issue report, we like to know the version of Spring Data Meilisearch that you are using and JVM version.

  • If you need to paste code, or include a stack trace format it as code using triple backtick.

  • If possible try to create a test-case or project that replicates the issue. Attach a link to your code or a compressed file containing your code.

Building from Source

Spring Data can be easily built with the maven wrapper. You also need JDK 17 or above.

 $ ./mvnw clean install

If you want to build with the regular mvn command, you will need Maven v3.5.0 or above.

Also see CONTRIBUTING.adoc if you wish to submit pull requests.

Building reference documentation

Building the documentation builds also the project without running tests.

 $ ./mvnw clean install -Pdistribute

The generated documentation is available from target/site/reference/html/index.html.

License

Spring Data Meilisearch is Open Source software released under the Apache 2.0 license.

spring-data-meilisearch's People

Contributors

junghoon-vans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

handedemir

spring-data-meilisearch's Issues

[BUG]: JacksonJsonHandler cannot parse task status enqueued

Description

I'm currently implementing a MeilisearchTemplate class for integration with Meilisearch.
In the process, I am getting the following error when using JacksonHandler.

Version

0.2.0

OS

MacOS

Steps to Reproduce

This is test code to save entity of the Movie.class.

@MeilisearchTest
@ContextConfiguration(classes = {MeilisearchTestConfiguration.class})
class MeilisearchTemplateTest {

  @Autowired
  MeilisearchOperations meilisearchTemplate;

  @Test
  void shouldSaveDocument() {
    // given
    Movie movie = new Movie();
    movie.setId("1");
    movie.setTitle("Star Wars");
    movie.setDescription("A long time ago in a galaxy far, far away...");
    movie.setGenres(new String[]{"action", "adventure", "fantasy", "sci-fi"});

    // when
    Movie saved = meilisearchTemplate.save(movie);

    // then
    assertThat(saved).isEqualTo(movie);
  }
}

Expected Behavior

None error occurs

Actual Behavior

[main] INFO org.testcontainers.utility.ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (composite of 'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
[main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock)
[main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost
[main] INFO org.testcontainers.DockerClientFactory - Connected to docker: 
  Server Version: 24.0.5
  API Version: 1.43
  Operating System: OrbStack
  Total Memory: 5253 MB
[main] INFO tc.testcontainers/ryuk:0.4.0 - Creating container for image: testcontainers/ryuk:0.4.0
[main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-osxkeychain) does not have credentials for https://index.docker.io/v1/
[main] INFO tc.testcontainers/ryuk:0.4.0 - Container testcontainers/ryuk:0.4.0 is starting: c77137a395ae9fb2571627c2b6f7e9a0b65699eceab8016eb5e459703e3a8a83
[main] INFO tc.testcontainers/ryuk:0.4.0 - Container testcontainers/ryuk:0.4.0 started in PT0.294142S
[main] INFO org.testcontainers.utility.RyukResourceReaper - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
[main] INFO org.testcontainers.DockerClientFactory - Checking the system...
[main] INFO org.testcontainers.DockerClientFactory - ✔︎ Docker server version should be at least 1.6.0
[main] INFO tc.getmeili/meilisearch:v1.2.0 - Creating container for image: getmeili/meilisearch:v1.2.0
[main] INFO tc.getmeili/meilisearch:v1.2.0 - Container getmeili/meilisearch:v1.2.0 is starting: 2d58495c7f13db675f07fb2f41080090ea011cbb1be31b4012563fd6a817070c
[main] INFO tc.getmeili/meilisearch:v1.2.0 - Container getmeili/meilisearch:v1.2.0 started in PT0.915265S

io.vanslog.spring.data.meilisearch.UncategorizedMeilisearchException: Failed to save entities.

	at io.vanslog.spring.data.meilisearch.core.MeilisearchTemplate.save(MeilisearchTemplate.java:70)
	at io.vanslog.spring.data.meilisearch.core.MeilisearchTemplate.save(MeilisearchTemplate.java:60)
	at io.vanslog.spring.data.meilisearch.core.MeilisearchTemplateTest.shouldSaveDocument(MeilisearchTemplateTest.java:33)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55)
Caused by: java.lang.RuntimeException: Meilisearch Exception: {com.fasterxml.jackson.databind.exc.InvalidFormatException. Error=com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `com.meilisearch.sdk.model.TaskStatus` from String "enqueued": not one of the values accepted for Enum class: [SUCCEEDED, PROCESSING, ENQUEUED, FAILED, CANCELED]
 at [Source: (String)"{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2023-08-10T13:11:30.272061144Z"}"; line: 1, column: 43] (through reference chain: com.meilisearch.sdk.model.TaskInfo["status"])}
	at com.meilisearch.sdk.http.response.BasicResponse.create(BasicResponse.java:22)
	at com.meilisearch.sdk.HttpClient.post(HttpClient.java:96)
	at com.meilisearch.sdk.Documents.addDocuments(Documents.java:155)
	at com.meilisearch.sdk.Index.addDocuments(Index.java:159)
	at io.vanslog.spring.data.meilisearch.core.MeilisearchTemplate.save(MeilisearchTemplate.java:68)
	... 72 more
Caused by: Meilisearch Exception: {com.fasterxml.jackson.databind.exc.InvalidFormatException. Error=com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `com.meilisearch.sdk.model.TaskStatus` from String "enqueued": not one of the values accepted for Enum class: [SUCCEEDED, PROCESSING, ENQUEUED, FAILED, CANCELED]
 at [Source: (String)"{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2023-08-10T13:11:30.272061144Z"}"; line: 1, column: 43] (through reference chain: com.meilisearch.sdk.model.TaskInfo["status"])}
	at com.meilisearch.sdk.json.JacksonJsonHandler.decode(JacksonJsonHandler.java:72)
	at com.meilisearch.sdk.http.response.BasicResponse.create(BasicResponse.java:15)
	... 76 more
Caused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `com.meilisearch.sdk.model.TaskStatus` from String "enqueued": not one of the values accepted for Enum class: [SUCCEEDED, PROCESSING, ENQUEUED, FAILED, CANCELED]
 at [Source: (String)"{"taskUid":0,"indexUid":"movies","status":"enqueued","type":"documentAdditionOrUpdate","enqueuedAt":"2023-08-10T13:11:30.272061144Z"}"; line: 1, column: 43] (through reference chain: com.meilisearch.sdk.model.TaskInfo["status"])
	at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:67)
	at com.fasterxml.jackson.databind.DeserializationContext.weirdStringException(DeserializationContext.java:2002)
	at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdStringValue(DeserializationContext.java:1230)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._deserializeAltString(EnumDeserializer.java:415)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer._fromString(EnumDeserializer.java:279)
	at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.deserialize(EnumDeserializer.java:248)
	at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3772)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3740)
	at com.meilisearch.sdk.json.JacksonJsonHandler.decode(JacksonJsonHandler.java:65)
	... 77 more

Additional Context

Errors related to this are reported in the Meilisearch-java.

However, the issue is not yet reflected in the general release.
So until this is fixed, we'll have to use GsonHandler.

[FEATURE]: support annotation based configuration

Description

Support @Configuration to provide an easy way to set up clients.

Solution

Support for configuring clients using MeilisearchConfiguration.

@Configuration
public class MyClientConfig extends MeilisearchConfiguration {

	@Override
	public ClientConfiguration clientConfiguration() {
		return ClientConfiguration.builder()
			.connectedTo("localhost:7700")
                        .withApiKey("masterKey")
                        .withClientAgents(
                            new String[]{"Meilisearch Java (v0.11.1)", "Spring Data Meilisearch (v1.0.0)"})
                        .build();
	}
}

Alternatives

None

Additional Context

None

[REFACTOR]: return null if document not found in get operation

Description

Currently, when looking up an entity via the get() method of the MeilisearchOperations, an error is thrown if the element is missing. However, the repository's method implementation requires the return of an optional object even if the entity does not exist. In order for the repository to return an option, operations requires the return of an empty object.

Solution

Allow nullable to return a value with or without a lookup.

Alternatives

No response

Additional Context

No response

[FEATURE]: implement operations for meilisearch APIs

Description

Defines an interface for implementing the Meilisearch APIs. This is implemented using the meilisearch-java client.

Tasks

Implementing a operations requires the following tasks

  • define MeilisearchOperation interface
  • create MeilisearchTemplate class to implement methods of operations
  • support configuration with Annotation

Methods of operations

  • Saves an entity.
  • Saves all given entities.
  • Retrieves an entity by its primary key.
  • Retrieves all entities of the given type.
  • Retrieves all entities of the given type with the given primary keys.
  • Checks whether an entity with the given primary key exists.
  • Returns the number of entities available.
  • Deletes the entity with the given primary key.
  • Deletes a given entity.
  • Deletes all entities of the given type with the given primary keys.
  • Deletes the given entities.
  • Deletes all entities of the given type.

[BUG]: filtering of multiGet method doesn't works

Description

Filtering by id in the multiGet(Class<T> clazz, List<String> documentIds) method does not work correctly.

Version

0.3.1-SNAPSHOT

OS

MacOS

Steps to Reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

Additional Context

No response

Use callback pattern to improve error handling

Description

The operations defined in the MeilisearchTemplate are all handling the same exception.
However, the way each method handles its own error handling is not efficient.

Solution

A good way to solve this is to define a Callback class and do the execution and error handling in a method called execute.

Alternatives

No response

Additional Context

No response

[BUG]: JsonIOException in gson handler

Description

If using a JSON handler with gson, the request to the server will result in an error like the one above.

Version

0.1.0-SNAPSHOT

OS

MacOS

Steps to Reproduce

This happens even if it's simply looking up an index.

Config config = new Config(
    "http://localhost:7700",
    "masterKey"
);
Client client = new Client(config);
Index index = client.getIndex("books");

Expected Behavior

Not occur error.

Actual Behavior

com.google.gson.JsonIOException: Failed making field 'java.net.Proxy#type' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.
java.lang.RuntimeException: com.google.gson.JsonIOException: Failed making field 'java.net.Proxy#type' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.
	at com.meilisearch.sdk.http.response.BasicResponse.create(BasicResponse.java:22)
	at com.meilisearch.sdk.HttpClient.get(HttpClient.java:76)
	at com.meilisearch.sdk.HttpClient.get(HttpClient.java:61)
	at com.meilisearch.sdk.IndexesHandler.getIndex(IndexesHandler.java:63)
	at com.meilisearch.sdk.Client.getIndex(Client.java:151)
	at io.vanslog.spring.data.meilisearch.core.ContainerTest.shouldConnectToMeilisearch(ContainerTest.java:30)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
	at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
	at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
	at jdk.proxy2/jdk.proxy2.$Proxy5.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
	at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
	at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
	at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: com.google.gson.JsonIOException: Failed making field 'java.net.Proxy#type' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type.
	at app//com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:38)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:286)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294)
	at app//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130)
	at app//com.google.gson.Gson.getAdapter(Gson.java:556)
	at app//com.google.gson.Gson.fromJson(Gson.java:1226)
	at app//com.google.gson.Gson.fromJson(Gson.java:1137)
	at app//com.google.gson.Gson.fromJson(Gson.java:1047)
	at app//com.google.gson.Gson.fromJson(Gson.java:1014)
	at app//com.meilisearch.sdk.json.GsonJsonHandler.decode(GsonJsonHandler.java:66)
	at app//com.meilisearch.sdk.http.response.BasicResponse.create(BasicResponse.java:15)
	... 90 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.net.Proxy$Type java.net.Proxy.type accessible: module java.base does not "opens java.net" to unnamed module @728938a9
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:35)
	... 147 more

Additional Context

First, change the json handler to jackson as the default.

Add support standalone repository

Description

There may be times when using repository infrastructure outside of Spring Containers.
To support this, we need to support the use of repositories in standalone.

Solution

Meilisearch repositories using CDI will be support these features.

Alternatives

No response

Additional Context

No response

Create a wrapper class for meilisearch client

Description

A wrapper class to extend the functionality of the Client class of Meilisearch-java.

Solution

The MeilisearchClient class will support configuration with ClientConfiguration.

Alternatives

No response

Additional Context

No response

Server credentials with ID sonatype not found!

Error:  Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy (injected-nexus-deploy) on project spring-data-meilisearch: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy failed: Server credentials with ID "sonatype" not found! -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Error: Process completed with exit code 1.

Changing condition for raising TaskStatusException

Description

Change the conditions under which a TaskStatusException is thrown.
Currently, it throws an exception on canceled or failed situations after a certain amount of time delay.

AS-IS

index.waitForTask(taskUid);
TaskStatus taskStatus = index.getTask(taskUid).getStatus();

if (taskStatus == TaskStatus.CANCELED || taskStatus == TaskStatus.FAILED) {
  throw new TaskStatusException(taskStatus, "Failed to save entities.");
}

Solution

However, a better approach would be to wait for the task and then throw an exception if it didn't complete.

TO-BE

if (taskStatus != TaskStatus.SUCCEEDED) {
  throw new TaskStatusException(taskStatus, "Failed to save entities.");
}

Alternatives

No response

Additional Context

No response

Add support auditing

Description

Spring Data provides sophisticated support to transparently keep track of who created or changed an entity and when the change happened.

Solution

Implement auditing feature of spring data.

Alternatives

No response

Additional Context

No response

Fix deployment error

Fix errors that occurred during deployment.

Error:  Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.3.0:enforce (enforce-release-rules) on project spring-data-meilisearch: 
Error:  Rule 1: org.apache.maven.enforcer.rules.dependency.RequireReleaseDeps failed with message:
Error:  io.vanslog:spring-data-meilisearch:jar:0.3.1-SNAPSHOT
Error:     org.springframework.data:spring-data-commons:jar:3.2.0-SNAPSHOT <--- is not a release dependency
Error:  
Error:  Rule 2: org.apache.maven.enforcer.rules.RequireReleaseVersion failed with message:
Error:  This project cannot be a snapshot:io.vanslog:spring-data-meilisearch:jar:0.3.1-SNAPSHOT
Error:  -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

[BUG]: error occurred while deploying the release

Description

An error occurred while deploying the release.

Version

0.1.0

OS

Linux

Steps to Reproduce

Runs cd pipeline

Expected Behavior

None error occurs

Actual Behavior

Error:  Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy (injected-nexus-deploy) on project spring-data-meilisearch: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy failed: An API incompatibility was encountered while executing org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7:deploy: java.lang.ExceptionInInitializerError: null
Error:  -----------------------------------------------------
Error:  realm =    extension>org.sonatype.plugins:nexus-staging-maven-plugin:1.6.7
Error:  strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Error:  urls[0] = file:/home/runner/.m2/repository/org/sonatype/plugins/nexus-staging-maven-plugin/1.6.7/nexus-staging-maven-plugin-1.6.7.jar
Error:  urls[1] = file:/home/runner/.m2/repository/org/sonatype/nexus/maven/nexus-common/1.6.7/nexus-common-1.6.7.jar
Error:  urls[2] = file:/home/runner/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
Error:  urls[3] = file:/home/runner/.m2/repository/org/sonatype/plexus/plexus-cipher/1.7/plexus-cipher-1.7.jar
Error:  urls[4] = file:/home/runner/.m2/repository/com/google/guava/guava/14.0.1/guava-14.0.1.jar
Error:  urls[5] = file:/home/runner/.m2/repository/org/sonatype/nexus/nexus-client-core/2.9.1-02/nexus-client-core-2.9.1-02.jar
Error:  urls[6] = file:/home/runner/.m2/repository/org/sonatype/nexus/plugins/nexus-restlet1x-model/2.9.1-02/nexus-restlet1x-model-2.9.1-02.jar
Error:  urls[7] = file:/home/runner/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar
Error:  urls[8] = file:/home/runner/.m2/repository/com/intellij/annotations/9.0.4/annotations-9.0.4.jar
Error:  urls[9] = file:/home/runner/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
Error:  urls[10] = file:/home/runner/.m2/repository/com/thoughtworks/xstream/xstream/1.4.7/xstream-1.4.7.jar
Error:  urls[11] = file:/home/runner/.m2/repository/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1.jar
Error:  urls[12] = file:/home/runner/.m2/repository/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar
Error:  urls[13] = file:/home/runner/.m2/repository/joda-time/joda-time/2.2/joda-time-2.2.jar
Error:  urls[14] = file:/home/runner/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
Error:  urls[15] = file:/home/runner/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.3/commons-beanutils-core-1.8.3.jar
Error:  urls[16] = file:/home/runner/.m2/repository/org/sonatype/sisu/siesta/siesta-client/1.7/siesta-client-1.7.jar
Error:  urls[17] = file:/home/runner/.m2/repository/org/sonatype/sisu/siesta/siesta-common/1.7/siesta-common-1.7.jar
Error:  urls[18] = file:/home/runner/.m2/repository/javax/ws/rs/jsr311-api/1.1.1/jsr311-api-1.1.1.jar
Error:  urls[19] = file:/home/runner/.m2/repository/com/sun/jersey/jersey-core/1.17.1/jersey-core-1.17.1.jar
Error:  urls[20] = file:/home/runner/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar
Error:  urls[21] = file:/home/runner/.m2/repository/com/sun/jersey/jersey-client/1.17.1/jersey-client-1.17.1.jar
Error:  urls[22] = file:/home/runner/.m2/repository/com/sun/jersey/contribs/jersey-apache-client4/1.17.1/jersey-apache-client4-1.17.1.jar
Error:  urls[23] = file:/home/runner/.m2/repository/org/sonatype/sisu/siesta/siesta-jackson/1.7/siesta-jackson-1.7.jar
Error:  urls[24] = file:/home/runner/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.1/jackson-annotations-2.3.1.jar
Error:  urls[25] = file:/home/runner/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.3.1/jackson-core-2.3.1.jar
Error:  urls[26] = file:/home/runner/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.1/jackson-databind-2.3.1.jar
Error:  urls[27] = file:/home/runner/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.3.1/jackson-jaxrs-json-provider-2.3.1.jar
Error:  urls[28] = file:/home/runner/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.3.1/jackson-jaxrs-base-2.3.1.jar
Error:  urls[29] = file:/home/runner/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.3.1/jackson-module-jaxb-annotations-2.3.1.jar
Error:  urls[30] = file:/home/runner/.m2/repository/org/apache/httpcomponents/httpclient/4.3.5/httpclient-4.3.5.jar
Error:  urls[31] = file:/home/runner/.m2/repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
Error:  urls[32] = file:/home/runner/.m2/repository/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
Error:  urls[33] = file:/home/runner/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar
Error:  urls[34] = file:/home/runner/.m2/repository/org/sonatype/spice/zapper/spice-zapper/1.3/spice-zapper-1.3.jar
Error:  urls[35] = file:/home/runner/.m2/repository/org/fusesource/hawtbuf/hawtbuf-proto/1.9/hawtbuf-proto-1.9.jar
Error:  urls[36] = file:/home/runner/.m2/repository/org/fusesource/hawtbuf/hawtbuf/1.9/hawtbuf-1.9.jar
Error:  urls[37] = file:/home/runner/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.8/plexus-utils-3.0.8.jar
Error:  urls[38] = file:/home/runner/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.15/plexus-interpolation-1.15.jar
Error:  urls[39] = file:/home/runner/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar
Error:  urls[40] = file:/home/runner/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar
Error:  Number of foreign imports: 1
Error:  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
Error:  
Error:  -----------------------------------------------------
Error:  : Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @41294371
Error:  -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Error: Process completed with exit code 1.

Additional Context

Related Issue: https://issues.sonatype.org/browse/OSSRH-66257

[REFACTOR]: register jsonhandler as bean

Description

The JSON Handler should be set globally and handled in a consistent way within the project

Solution

Annotation based configuration

@Configuration
class CustomConfiguration extends MeilisearchConfiguration {

    @Override
    ClientConfiguration clientConfiguration() {
        return ClientConfiguration.builder()
                .connectedToLocal
                .withApiKey("masterKey")
                .build();
    }

    @Override
    JsonHandler jsonHandler() {
         return new GsonJsonHandler();
    }
}

XML based configuration

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:meilisearch="http://www.vanslog.io/spring/data/meilisearch"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.vanslog.io/spring/data/meilisearch
       http://www.vanslog.io/spring/data/meilisearch/spring-meilisearch-1.0.xsd">

    <meilisearch:meilisearch-client id="meilisearchClient" api-key="masterKey"/>
    <bean id="jsonHandler" class="com.meilisearch.sdk.json.GsonJsonHandler"/>
</beans>

Alternatives

No response

Additional Context

No response

Rule failure while trying to close staging repository

Error:  Rule failure while trying to close staging repository with ID "iovanslog-1010".
Error:  
Error:  Nexus Staging Rules Failure Report
Error:  ==================================
Error:  
Error:  Repository "iovanslog-1010" failures
Error:    Rule "javadoc-staging" failures
Error:      * Missing: no javadoc jar found in folder '/io/vanslog/spring-data-meilisearch/0.4.0'
Error:  
Error:  
Error:  Cleaning up local stage directory after a Rule failure during close of staging repositories: [iovanslog-1010]
Error:   * Deleting context 2d2909bbbcb58c.properties
Error:  Cleaning up remote stage repositories after a Rule failure during close of staging repositories: [iovanslog-1010]
Error:   * Dropping failed staging repository with ID "iovanslog-1010" (Rule failure during close of staging repositories: [iovanslog-1010]).

Waiting for operation to complete...
...

Error:  Remote staging finished with a failure: Staging rules failure!
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:24 min
[INFO] Finished at: 2023-08-23T13:18:51Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.13:deploy (injected-nexus-deploy) on project spring-data-meilisearch: Remote staging failed: Staging rules failure! -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

[BUG]: exists method fails to return false

Description

If the document does not exist, the exists() method must return false.

Version

0.3.1-SNAPSHOT

OS

MacOS

Steps to Reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

Additional Context

No response

Specify javadoc link as full path

Currently, in the JavaDocs documentation, when use the @link annotation to reference another class file, it sometimes only specifies the class name, not the full path. To explicitly reference a class file, specify the full path.

feat: convert persistent entity to json string

In order to add documents to the meilisearch server using meilisearch-java, the entity must be provided in the form of a json string. Therefore, I will add a function to change the persistent entity to a json string.

[REFACTOR]: make ClientConfiguration as wrapper for Config from the Meilisearch SDK.

Description

The biggest problem with the current client setup is that it relies on the Config class from the Meilisearch SDK.

@Configuration
public class CustomConfiguration extends MeilisearchConfiguration {

  @Override
  public Config clientConfiguration() {
    return ClientConfiguration.builder()
        .connectedToLocalhost()
        .withApiKey("masterKey")
        .build();
  }
}

For example, the Config class should be directly beaned and used as shown above.

Solution

To solve this, utilize the existing ClientConfiguration interface.

@Configuration
public class CustomConfiguration extends MeilisearchConfiguration {

  @Override
  public ClientConfiguration clientConfiguration() {
    return ClientConfiguration.builder()
        .connectedToLocalhost()
        .withApiKey("masterKey")
        .build();
  }
}

To make this change, ClientConfiguration must encapsulate a concrete Config class.

Alternatives

No response

Additional Context

No response

[CHORE]: migrate build system to maven

Description

Spring Data provides a common build infrastructure to be used by Spring Data modules that build with Maven.

Solution

In order to be compatible with this infrastructure, migrate our project's build system to Maven.

Alternatives

No response

Additional Context

No response

Support custom timeout to wait for task

Description

Provides the feature to set a timeout and interval to wait for the task.

Solution

Add the Timeout and Interval properties to the settings of the MeilisearchClient.

Alternatives

No response

Additional Context

No response

No matching constructor found in class 'MeilisearchTemplate'

Description

스크린샷 2023-08-30 오후 5 42 16

If this error occurs, execution is not affected.
because constructor's second argument is being treated as @Nullable.

Solution

Split the constructor in two to remove the warning statement.

AS-IS

public MeilisearchTemplate(MeilisearchClient client, @Nullable MeilisearchConverter meilisearchConverter) {
        this.client = client;
        this.meilisearchConverter = meilisearchConverter != null ? meilisearchConverter
		        : new MappingMeilisearchConverter(new SimpleMeilisearchMappingContext());
}

TO-BE

public MeilisearchTemplate(MeilisearchClient client) {
        this.client = client;
        this.meilisearchConverter = new MappingMeilisearchConverter(new SimpleMeilisearchMappingContext());
}

public MeilisearchTemplate(MeilisearchClient client, MeilisearchConverter meilisearchConverter) {
        this.client = client;
        this.meilisearchConverter = meilisearchConverter;
}

Release 0.5.0

New features

  • Support custom request timeout.
  • Create wrapper class for meilisearch client.

[FEATURE]: implement repository interface for meilisearch operations

In Spring Data, the repository are a common interface to access data storage, so we need to provide a standardized way to manipulate data that is accessible regardless of the type of data storage.

Tasks

Implementing a repository requires the following tasks

  • Repository to manipulate data in meilisearch
  • Support configuration with Spring Namespace
  • Support configuration with Annotation

[REFACTOR]: use json handler instead of entity mapper

Description

The current entity mapper depends on jackson databind.
However, our project may use other JSON handlers such as GSON, so a refactoring is needed.

Solution

Use json handler in meilisearch-java library.

Alternatives

No response

Additional Context

No response

feat: implements mapping library for meilisearch document

Meilisearch Document Structure

document_structure

The document is a data structure used by Meilisearch. It consists of a Primary Field and a Standard Field. The Primary Field has an identifier called Primary Key and the value of this Attribute is called Document id.

Extends springframework data mapping

Extends the following spring data classes to get the document mapping.

  • org.springframework.data.mapping.PersistentEntity
  • org.springframework.data.mapping.PersistentProperty

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.