Skip to content

Commit ea40545

Browse files
author
quarkusbot
committed
Sync web site with Quarkus documentation
1 parent 521b56a commit ea40545

File tree

4 files changed

+36
-31
lines changed

4 files changed

+36
-31
lines changed

_guides/_attributes.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Common attributes.
22
// --> No blank lines (it ends the document header)
33
:project-name: Quarkus
4-
:quarkus-version: 3.17.2
4+
:quarkus-version: 3.17.3
55
:quarkus-platform-groupid: io.quarkus.platform
66
// .
77
:maven-version: 3.9.9

_guides/hibernate-search-orm-elasticsearch.adoc

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -627,32 +627,29 @@ Edit `src/main/resources/application.properties` and inject the following config
627627

628628
[source,properties]
629629
----
630-
quarkus.ssl.native=false <1>
630+
quarkus.datasource.db-kind=postgresql <1>
631631
632-
quarkus.datasource.db-kind=postgresql <2>
632+
quarkus.hibernate-orm.sql-load-script=import.sql <2>
633633
634-
quarkus.hibernate-orm.sql-load-script=import.sql <3>
634+
quarkus.hibernate-search-orm.elasticsearch.version=8 <3>
635+
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <4>
635636
636-
quarkus.hibernate-search-orm.elasticsearch.version=8 <4>
637-
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <5>
638-
639-
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test <6>
637+
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test
640638
%prod.quarkus.datasource.username=quarkus_test
641639
%prod.quarkus.datasource.password=quarkus_test
642640
%prod.quarkus.hibernate-orm.database.generation=create
643-
%prod.quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:9200 <6>
641+
%prod.quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:9200 <5>
644642
----
645-
<1> We won't use SSL, so we disable it to have a more compact native executable.
646-
<2> Let's create a PostgreSQL datasource.
647-
<3> We load some initial data on startup (see <<automatic-import-script>>).
648-
<4> We need to tell Hibernate Search about the version of Elasticsearch we will use.
643+
<1> Let's create a PostgreSQL datasource.
644+
<2> We load some initial data on startup (see <<automatic-import-script>>).
645+
<3> We need to tell Hibernate Search about the version of Elasticsearch we will use.
649646
It is important because there are significant differences between Elasticsearch mapping syntax depending on the version.
650647
Since the mapping is created at build time to reduce startup time, Hibernate Search cannot connect to the cluster to automatically detect the version.
651648
Note that, for OpenSearch, you need to prefix the version with `opensearch:`; see <<opensearch>>.
652-
<5> This means that we wait for the entities to be searchable before considering a write complete.
649+
<4> This means that we wait for the entities to be searchable before considering a write complete.
653650
On a production setup, the `write-sync` default will provide better performance.
654651
Using `sync` is especially important when testing as you need the entities to be searchable immediately.
655-
<6> For development and tests, we rely on <<dev-services,Dev Services>>,
652+
<5> For development and tests, we rely on <<dev-services,Dev Services>>,
656653
which means Quarkus will start a PostgreSQL database and Elasticsearch cluster automatically.
657654
In production mode, however,
658655
we will want to start a PostgreSQL database and Elasticsearch cluster manually,

_guides/hibernate-search-standalone-elasticsearch.adoc

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -559,31 +559,28 @@ Edit `src/main/resources/application.properties` and inject the following config
559559

560560
[source,properties]
561561
----
562-
quarkus.ssl.native=false <1>
562+
quarkus.hibernate-search-standalone.mapping.structure=document <1>
563+
quarkus.hibernate-search-standalone.elasticsearch.version=8 <2>
564+
quarkus.hibernate-search-standalone.indexing.plan.synchronization.strategy=sync <3>
563565
564-
quarkus.hibernate-search-standalone.mapping.structure=document <2>
565-
quarkus.hibernate-search-standalone.elasticsearch.version=8 <3>
566-
quarkus.hibernate-search-standalone.indexing.plan.synchronization.strategy=sync <4>
567-
568-
%prod.quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:9200 <5>
566+
%prod.quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:9200 <4>
569567
----
570-
<1> We won't use SSL, so we disable it to have a more compact native executable.
571-
<2> We need to tell Hibernate Search about the structure of our entities.
568+
<1> We need to tell Hibernate Search about the structure of our entities.
572569
+
573570
In this application we consider an indexed entity (the author) is the root of a "document":
574571
the author "owns" books it references through associations,
575572
which *cannot* be updated independently of the author.
576573
+
577574
See <<quarkus-hibernate-search-standalone-elasticsearch_quarkus-hibernate-search-standalone-mapping-structure,`quarkus.hibernate-search-standalone.mapping.structure`>> for other options and more details.
578-
<3> We need to tell Hibernate Search about the version of Elasticsearch we will use.
575+
<2> We need to tell Hibernate Search about the version of Elasticsearch we will use.
579576
+
580577
It is important because there are significant differences between Elasticsearch mapping syntax depending on the version.
581578
Since the mapping is created at build time to reduce startup time, Hibernate Search cannot connect to the cluster to automatically detect the version.
582579
Note that, for OpenSearch, you need to prefix the version with `opensearch:`; see <<opensearch>>.
583-
<4> This means that we wait for the entities to be searchable before considering a write complete.
580+
<3> This means that we wait for the entities to be searchable before considering a write complete.
584581
On a production setup, the `write-sync` default will provide better performance.
585582
Using `sync` is especially important when testing as you need the entities to be searchable immediately.
586-
<5> For development and tests, we rely on <<dev-services,Dev Services>>,
583+
<4> For development and tests, we rely on <<dev-services,Dev Services>>,
587584
which means Quarkus will start an Elasticsearch cluster automatically.
588585
In production mode, however,
589586
we will want to start an Elasticsearch cluster manually,

_guides/qute-reference.adoc

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,10 +2994,9 @@ If there is a message bundle method that accepts a single parameter of an enum t
29942994
@Message <1>
29952995
String methodName(MyEnum enum);
29962996
----
2997-
<1> The value is intentionally not provided. There's also no key for the method in a localized file.
2998-
2999-
Then it receives a generated template:
2997+
<1> The value is intentionally not provided. There's also no key/value pair for this method in a localized file.
30002998

2999+
Then it receives a generated template like:
30013000
[source,html]
30023001
----
30033002
{#when enumParamName}
@@ -3006,15 +3005,27 @@ Then it receives a generated template:
30063005
{/when}
30073006
----
30083007

3009-
Furthermore, a special message method is generated for each enum constant. Finally, each localized file must contain keys and values for all constant message keys:
3008+
Furthermore, a special message method is generated for each enum constant.
3009+
Finally, each localized file must contain keys and values for all enum constants:
30103010

30113011
[source,poperties]
30123012
----
30133013
methodName_CONSTANT1=Value 1
30143014
methodName_CONSTANT2=Value 2
30153015
----
30163016

3017-
In a template, an enum constant can be localized with a message bundle method like `{msg:methodName(enumConstant)}`.
3017+
// We need to escape the first underscore
3018+
// See https://docs.asciidoctor.org/asciidoc/latest/subs/prevent/
3019+
[IMPORTANT]
3020+
.Message keys for enum constants
3021+
====
3022+
By default, the message key consists of the method name followed by the `\_` separator and the constant name.
3023+
If any constant name of a particular enum contains the `_` or the `$` character then the `\_$` separator must be used for all message keys for this enum instead.
3024+
For example, `methodName_$CONSTANT_1=Value 1` or `methodName_$CONSTANT$1=Value 1`.
3025+
A constant of a localized enum may not contain the `_$` separator.
3026+
====
3027+
3028+
In a template, the localized message for an enum constant can be obtained with a message bundle method like `{msg:methodName(enumConstant)}`.
30183029

30193030
TIP: There is also <<convenient-annotation-for-enums,`@TemplateEnum`>> - a convenient annotation to access enum constants in a template.
30203031

0 commit comments

Comments
 (0)