Rename AssumeConnection to EnabledOnElasticsearch following the typical design of JUnit 5 EnabledOn… annotation programming model. Enable tests by default if the test element isn't annotated with EnabledOnElasticsearch as we assume that the extension was activated by the parent. Move EnabledOnElasticsearch into utility project. See #583 Original pull request: #609
Spring Data Elasticsearch - Reactive Examples
The ReactiveElasticsearchClient is a client based on WebClient.
It uses the request/response objects provided by the Elasticsearch core project.
Calls are directly operated on the reactive stack, not wrapping async (thread pool bound) responses into reactive types.
@SpringBootApplication
class ApplicationConfiguration {}
The ReactiveElasticsearchClient can be used with the ReactiveElasticsearchOperations and ReactiveElasticsearchRepository.
@Autowired ReactiveElasticsearchOperations operations;
// ...
CriteriaQuery query = new CriteriaQuery("keywords").contains("java");
Flux<Conference> result = operations.find(query, Conference.class);
interface ConferenceRepository extends ReactiveCrudRepository<Conference, String> {
Flux<Conference> findAllByKeywordsContains(String keyword);
}
// ...
@Autowired ConferenceRepository repository;
// ...
Flux<Conference> result = repository.findAllByKeywordsContains("java");
Requirements:
Running Elasticsearch
$ cd elasticsearch
$ ./bin/elasticsearch