Skip to content

Commit

Permalink
Merge pull request quarkusio#39415 from yrodiere/i26182-hsearch-stand…
Browse files Browse the repository at this point in the history
…alone

Extension for the Hibernate Search Standalone Pojo Mapper with Elasticsearch
  • Loading branch information
yrodiere authored Mar 19, 2024
2 parents 87145dc + ec4a39c commit 08c418b
Show file tree
Hide file tree
Showing 147 changed files with 8,211 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
},
{
"category": "Data6",
"timeout": 95,
"test-modules": "elasticsearch-rest-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-outbox-polling",
"timeout": 105,
"test-modules": "elasticsearch-rest-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-outbox-polling, hibernate-search-standalone-elasticsearch, hibernate-search-standalone-opensearch",
"os-name": "ubuntu-latest"
},
{
Expand Down
10 changes: 10 additions & 0 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,16 @@
<artifactId>quarkus-hibernate-search-orm-outbox-polling-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-search-standalone-elasticsearch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-search-standalone-elasticsearch-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum Feature {
HIBERNATE_REACTIVE_PANACHE_KOTLIN,
HIBERNATE_REACTIVE_REST_DATA_PANACHE,
HIBERNATE_SEARCH_ELASTICSEARCH,
HIBERNATE_SEARCH_STANDALONE_ELASTICSEARCH,
HIBERNATE_VALIDATOR,
INFINISPAN_CLIENT,
INFINISPAN_EMBEDDED,
Expand Down
13 changes: 13 additions & 0 deletions devtools/bom-descriptor-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-search-standalone-elasticsearch</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-search-standalone-elasticsearch-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-validator-deployment</artifactId>
Expand Down
21 changes: 15 additions & 6 deletions docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ You have a Hibernate ORM-based application? You want to provide a full-featured
With this guide, you'll learn how to synchronize your entities to an Elasticsearch or OpenSearch cluster in a heartbeat with Hibernate Search.
We will also explore how you can query your Elasticsearch or OpenSearch cluster using the Hibernate Search API.

[IMPORTANT]
====
If you want to index entities that are not Hibernate ORM entities,
see xref:hibernate-search-standalone-elasticsearch.adoc[this dedicated guide] instead.
====

== Prerequisites

:prerequisites-time: 20 minutes
Expand Down Expand Up @@ -1134,7 +1140,7 @@ quarkus.hibernate-search-orm.management.enabled=true <2>
<1> Enable the xref:./management-interface-reference.adoc[management interface].
<2> Enable Hibernate Search specific management endpoints.

Once the management is enabled, data can be re-indexed via `/q/hibernate-search/reindex`, where `/q` is the default management root path
Once the management endpoints are enabled, data can be re-indexed via `/q/hibernate-search/reindex`, where `/q` is the default management root path
and `/hibernate-search` is the default Hibernate Search root management path.
It (`/hibernate-search`) can be changed via configuration property as shown below.

Expand Down Expand Up @@ -1203,7 +1209,7 @@ The full list of possible filters and available mass indexer configurations is p
<13> Specifies the fetch size to be used when loading primary keys if objects to be indexed.
<14> Specifies the timeout of transactions for loading ids and entities to be re-indexed.
+
Note all the properties in the json are optional, and only those that are needed should be used.
Note all the properties in the JSON are optional, and only those that are needed should be used.

For more detailed information on mass indexer configuration see the
link:{hibernate-search-docs-url}#indexing-massindexer-parameters[corresponding section of the Hibernate Search reference documentation].
Expand All @@ -1217,19 +1223,22 @@ When working with multiple persistence units, the name of the persistence unit t

== Further reading

If you are interested in learning more about Hibernate Search 6,
the Hibernate team publishes link:{hibernate-search-docs-url}[an extensive reference documentation].
If you are interested in learning more about Hibernate Search,
the Hibernate team publishes link:{hibernate-search-docs-url}[an extensive reference documentation],
as well as a page listing https://hibernate.org/search/more-resources/[other relevant resources].

== FAQ

=== Why Elasticsearch only?

Hibernate Search supports both a Lucene backend and an Elasticsearch backend.

In the context of Quarkus and to build microservices, we thought the latter would make more sense.
In the context of Quarkus and to build scalable applications, we thought the latter would make more sense.
Thus, we focused our efforts on it.

We don't have plans to support the Lucene backend in Quarkus for now.
We don't have plans to support the Lucene backend in Quarkus for now,
though there is an issue tracking progress on such an implementation in the Quarkiverse:
https://github.com/quarkiverse/quarkus-hibernate-search-extras/issues/179[quarkiverse/quarkus-hibernate-search-extras#179].

[[configuration-reference]]
== Configuration Reference for Hibernate Search with Hibernate ORM
Expand Down
Loading

0 comments on commit 08c418b

Please sign in to comment.