14
14
:html-meta-description: Hibernate Search, full text search for your entities - Getting started with Hibernate Search’s Standalone POJO Mapper
15
15
:html-meta-keywords: hibernate, search, hibernate search, full text, lucene, elasticsearch, opensearch
16
16
:html-meta-canonical-link: https://docs.jboss.org/hibernate/stable/search/getting-started/standalone/en-US/html_single/
17
+ :html-meta-version-family: {hibernateSearchVersionShort}
17
18
18
19
:relfileprefix: ../../
19
20
:relfilesuffix: /../en-US/html_single/index.html
@@ -57,7 +58,7 @@ The Hibernate Search artifacts can be found in Maven's http://central.sonatype.o
57
58
If you get Hibernate Search from Maven, it is recommended to import Hibernate Search BOM
58
59
as part of your dependency management to keep all its artifact versions aligned:
59
60
60
- [source, XML , subs="+attributes"]
61
+ [source, xml , subs="+attributes"]
61
62
----
62
63
<dependencyManagement>
63
64
<dependencies>
@@ -95,7 +96,7 @@ storing the index on the local filesystem.
95
96
+
96
97
If you get Hibernate Search from Maven, use these dependencies:
97
98
+
98
- [source, XML , subs="+attributes"]
99
+ [source, xml , subs="+attributes"]
99
100
----
100
101
<dependencies>
101
102
<!--
@@ -124,7 +125,7 @@ storing the index on a remote Elasticsearch or OpenSearch cluster (to be configu
124
125
+
125
126
If you get Hibernate Search from Maven, use these dependencies:
126
127
+
127
- [source, XML , subs="+attributes"]
128
+ [source, xml , subs="+attributes"]
128
129
----
129
130
<dependencies>
130
131
<!--
@@ -158,7 +159,7 @@ are set programmatically when building the mapping.
158
159
159
160
.Hibernate Search properties for a "Standalone POJO Mapper + Lucene" setup
160
161
====
161
- [source, JAVA , indent=0]
162
+ [source, java , indent=0]
162
163
----
163
164
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=setup-lucene]
164
165
----
@@ -170,7 +171,7 @@ By default, the backend will store indexes in the current working directory.
170
171
171
172
.Hibernate Search properties for a "Standalone POJO Mapper + Elasticsearch/OpenSearch" setup
172
173
====
173
- [source, JAVA , indent=0]
174
+ [source, java , indent=0]
174
175
----
175
176
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=setup-elasticsearch]
176
177
----
@@ -208,11 +209,11 @@ and you want to index them in order to search for books.
208
209
209
210
.Book and Author types BEFORE adding Hibernate Search specific annotations
210
211
====
211
- [source, JAVA , indent=0]
212
+ [source, java , indent=0]
212
213
----
213
214
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withouthsearch/Book.java[tags=include;!getters-setters]
214
215
----
215
- [source, JAVA , indent=0]
216
+ [source, java , indent=0]
216
217
----
217
218
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withouthsearch/Author.java[tags=include;!getters-setters]
218
219
----
@@ -231,11 +232,11 @@ Below is an example of how the model above can be mapped.
231
232
232
233
.Book and Author entities AFTER adding Hibernate Search specific annotations
233
234
====
234
- [source, JAVA , indent=0]
235
+ [source, java , indent=0]
235
236
----
236
237
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/Book.java[tags=include;!getters-setters]
237
238
----
238
- [source, JAVA , indent=0]
239
+ [source, java , indent=0]
239
240
----
240
241
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/Author.java[tags=include;!getters-setters]
241
242
----
@@ -372,7 +373,7 @@ Use `add` when the entity is first added and you are absolutely certain it does
372
373
373
374
.Using the Standalone POJO Mapper to index data
374
375
====
375
- [source, JAVA , indent=0]
376
+ [source, java , indent=0]
376
377
----
377
378
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=indexing]
378
379
----
@@ -382,7 +383,7 @@ Use `addOrUpdate` to add/update the entity when the entity may already exist in
382
383
383
384
.Using the Standalone POJO Mapper to index data
384
385
====
385
- [source, JAVA , indent=0]
386
+ [source, java , indent=0]
386
387
----
387
388
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=indexing-addOrUpdate]
388
389
----
@@ -392,7 +393,7 @@ Add use `delete` to delete the entity from the index:
392
393
393
394
.Using the Standalone POJO Mapper to index data
394
395
====
395
- [source, JAVA , indent=0]
396
+ [source, java , indent=0]
396
397
----
397
398
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=indexing-delete]
398
399
----
@@ -412,7 +413,7 @@ with the <<mapper-pojo-standalone-getting-started-analysis-default-analyzer,defa
412
413
413
414
.Using Hibernate Search to query the indexes
414
415
====
415
- [source, JAVA , indent=0, subs="+callouts"]
416
+ [source, java , indent=0, subs="+callouts"]
416
417
----
417
418
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=searching-lambdas]
418
419
----
@@ -435,7 +436,7 @@ but it will be a bit more verbose:
435
436
436
437
.Using Hibernate Search to query the indexes -- object-based syntax
437
438
====
438
- [source, JAVA , indent=0]
439
+ [source, java , indent=0]
439
440
----
440
441
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=searching-objects]
441
442
----
@@ -458,7 +459,7 @@ It is possible to get just the total hit count, using `fetchTotalHitCount()`.
458
459
459
460
.Using Hibernate Search to count the matches
460
461
====
461
- [source, JAVA , indent=0, subs="+callouts"]
462
+ [source, java , indent=0, subs="+callouts"]
462
463
----
463
464
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/defaultanalysis/GettingStartedDefaultAnalysisIT.java[tags=counting]
464
465
----
@@ -533,11 +534,11 @@ The examples below show how to define an analyzer with these components, dependi
533
534
534
535
.Analysis configurer implementation and configuration for a "Standalone POJO Mapper + Lucene" setup
535
536
====
536
- [source, JAVA , indent=0, subs="+callouts"]
537
+ [source, java , indent=0, subs="+callouts"]
537
538
----
538
539
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/MyLuceneAnalysisConfigurer.java[tags=include]
539
540
----
540
- [source, JAVA , indent=0, subs="+callouts"]
541
+ [source, java , indent=0, subs="+callouts"]
541
542
----
542
543
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/GettingStartedCustomAnalysisIT.java[tags=setup-lucene]
543
544
----
@@ -558,11 +559,11 @@ For more information about the bean references, see xref:{reference-documentatio
558
559
559
560
.Analysis configurer implementation and configuration for a "Standalone POJO Mapper + Elasticsearch/OpenSearch" setup
560
561
====
561
- [source, JAVA , indent=0, subs="+callouts"]
562
+ [source, java , indent=0, subs="+callouts"]
562
563
----
563
564
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/MyElasticsearchAnalysisConfigurer.java[tags=include]
564
565
----
565
- [source, XML , indent=0, subs="+callouts"]
566
+ [source, xml , indent=0, subs="+callouts"]
566
567
----
567
568
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/GettingStartedCustomAnalysisIT.java[tags=setup-elasticsearch]
568
569
----
@@ -587,11 +588,11 @@ Once analysis is configured, the mapping must be adapted to assign the relevant
587
588
588
589
.Book and Author entities after adding Hibernate Search specific annotations
589
590
====
590
- [source, JAVA , indent=0, subs="+callouts"]
591
+ [source, java , indent=0, subs="+callouts"]
591
592
----
592
593
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/Book.java[tags=include;!getters-setters]
593
594
----
594
- [source, JAVA , indent=0, subs="+callouts"]
595
+ [source, java , indent=0, subs="+callouts"]
595
596
----
596
597
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/Author.java[tags=include;!getters-setters]
597
598
----
@@ -615,7 +616,7 @@ will show up in the results.
615
616
616
617
.Using Hibernate Search to query the indexes after analysis was configured
617
618
====
618
- [source, JAVA , indent=0]
619
+ [source, java , indent=0]
619
620
----
620
621
include::{sourcedir}/org/hibernate/search/documentation/mapper/pojo/standalone/gettingstarted/withhsearch/customanalysis/GettingStartedCustomAnalysisIT.java[tags=searching]
621
622
----
0 commit comments