From 154c50b3b79c72c0c3a1f30d173795a2456e722a Mon Sep 17 00:00:00 2001 From: peermuellerxw <43608581+peermuellerxw@users.noreply.github.com> Date: Fri, 12 Feb 2021 16:56:14 +0100 Subject: [PATCH] Fix some anchor links in documentation. Original Pull Request: #1690 Closes #1689 --- src/main/asciidoc/reference/elasticsearch-operations.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/asciidoc/reference/elasticsearch-operations.adoc b/src/main/asciidoc/reference/elasticsearch-operations.adoc index 34a752c2b..b1f55eaf1 100644 --- a/src/main/asciidoc/reference/elasticsearch-operations.adoc +++ b/src/main/asciidoc/reference/elasticsearch-operations.adoc @@ -173,10 +173,12 @@ Returned by the low level scroll API functions in `ElasticsearchRestTemplate`, i .SearchHitsIterator An Iterator returned by the streaming functions of the `SearchOperations` interface. +[[elasticsearch.operations.queries]] == Queries Almost all of the methods defined in the `SearchOperations` and `ReactiveSearchOperations` interface take a `Query` parameter that defines the query to execute for searching. `Query` is an interface and Spring Data Elasticsearch provides three implementations: `CriteriaQuery`, `StringQuery` and `NativeSearchQuery`. +[[elasticsearch.operations.criteriaquery]] === CriteriaQuery `CriteriaQuery` based queries allow the creation of queries to search for data without knowing the syntax or basics of Elasticsearch queries. They allow the user to build queries by simply chaining and combining `Criteria` objects that specifiy the criteria the searched documents must fulfill. @@ -241,6 +243,7 @@ Query query = new CriteriaQuery(criteria); Please refer to the API documentation of the `Criteria` class for a complete overview of the different available operations. +[[elasticsearch.operations.stringquery]] === StringQuery This class takes an Elasticsearch query as JSON String. @@ -258,6 +261,7 @@ SearchHits searchHits = operations.search(query, Person.class); Using `StringQuery` may be appropriate if you already have an Elasticsearch query to use. +[[elasticsearch.operations.nativesearchquery]] === NativeSearchQuery `NativeSearchQuery` is the class to use when you have a complex query, or a query that cannot be expressed by using the `Criteria` API, for example when building queries and using aggregates.