Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop mentions of quarkus.ssl.native=false in Hibernate Search guides #44798

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions docs/src/main/asciidoc/hibernate-search-orm-elasticsearch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -627,32 +627,29 @@ Edit `src/main/resources/application.properties` and inject the following config

[source,properties]
----
quarkus.ssl.native=false <1>
quarkus.datasource.db-kind=postgresql <1>

quarkus.datasource.db-kind=postgresql <2>
quarkus.hibernate-orm.sql-load-script=import.sql <2>

quarkus.hibernate-orm.sql-load-script=import.sql <3>
quarkus.hibernate-search-orm.elasticsearch.version=8 <3>
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <4>

quarkus.hibernate-search-orm.elasticsearch.version=8 <4>
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <5>

%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test <6>
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test
Comment on lines -639 to +637
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might look odd but the <6> callout was actually reused below and I think this one was bogus.

%prod.quarkus.datasource.username=quarkus_test
%prod.quarkus.datasource.password=quarkus_test
%prod.quarkus.hibernate-orm.database.generation=create
%prod.quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:9200 <6>
%prod.quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:9200 <5>
----
<1> We won't use SSL, so we disable it to have a more compact native executable.
<2> Let's create a PostgreSQL datasource.
<3> We load some initial data on startup (see <<automatic-import-script>>).
<4> We need to tell Hibernate Search about the version of Elasticsearch we will use.
<1> Let's create a PostgreSQL datasource.
<2> We load some initial data on startup (see <<automatic-import-script>>).
<3> We need to tell Hibernate Search about the version of Elasticsearch we will use.
It is important because there are significant differences between Elasticsearch mapping syntax depending on the version.
Since the mapping is created at build time to reduce startup time, Hibernate Search cannot connect to the cluster to automatically detect the version.
Note that, for OpenSearch, you need to prefix the version with `opensearch:`; see <<opensearch>>.
<5> This means that we wait for the entities to be searchable before considering a write complete.
<4> This means that we wait for the entities to be searchable before considering a write complete.
On a production setup, the `write-sync` default will provide better performance.
Using `sync` is especially important when testing as you need the entities to be searchable immediately.
<6> For development and tests, we rely on <<dev-services,Dev Services>>,
<5> For development and tests, we rely on <<dev-services,Dev Services>>,
which means Quarkus will start a PostgreSQL database and Elasticsearch cluster automatically.
In production mode, however,
we will want to start a PostgreSQL database and Elasticsearch cluster manually,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,31 +559,28 @@ Edit `src/main/resources/application.properties` and inject the following config

[source,properties]
----
quarkus.ssl.native=false <1>
quarkus.hibernate-search-standalone.mapping.structure=document <1>
quarkus.hibernate-search-standalone.elasticsearch.version=8 <2>
quarkus.hibernate-search-standalone.indexing.plan.synchronization.strategy=sync <3>

quarkus.hibernate-search-standalone.mapping.structure=document <2>
quarkus.hibernate-search-standalone.elasticsearch.version=8 <3>
quarkus.hibernate-search-standalone.indexing.plan.synchronization.strategy=sync <4>

%prod.quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:9200 <5>
%prod.quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:9200 <4>
----
<1> We won't use SSL, so we disable it to have a more compact native executable.
<2> We need to tell Hibernate Search about the structure of our entities.
<1> We need to tell Hibernate Search about the structure of our entities.
+
In this application we consider an indexed entity (the author) is the root of a "document":
the author "owns" books it references through associations,
which *cannot* be updated independently of the author.
+
See <<quarkus-hibernate-search-standalone-elasticsearch_quarkus-hibernate-search-standalone-mapping-structure,`quarkus.hibernate-search-standalone.mapping.structure`>> for other options and more details.
<3> We need to tell Hibernate Search about the version of Elasticsearch we will use.
<2> We need to tell Hibernate Search about the version of Elasticsearch we will use.
+
It is important because there are significant differences between Elasticsearch mapping syntax depending on the version.
Since the mapping is created at build time to reduce startup time, Hibernate Search cannot connect to the cluster to automatically detect the version.
Note that, for OpenSearch, you need to prefix the version with `opensearch:`; see <<opensearch>>.
<4> This means that we wait for the entities to be searchable before considering a write complete.
<3> This means that we wait for the entities to be searchable before considering a write complete.
On a production setup, the `write-sync` default will provide better performance.
Using `sync` is especially important when testing as you need the entities to be searchable immediately.
<5> For development and tests, we rely on <<dev-services,Dev Services>>,
<4> For development and tests, we rely on <<dev-services,Dev Services>>,
which means Quarkus will start an Elasticsearch cluster automatically.
In production mode, however,
we will want to start an Elasticsearch cluster manually,
Expand Down
Loading