Full text search engines like Apache Lucene are very powerful technologies to add efficient free text search capabilities to applications. However, Lucene suffers several mismatches when dealing with object domain models. Amongst other things indexes have to be kept up to date and mismatches between index structure and domain model as well as query mismatches have to be avoided.
Hibernate Search addresses these shortcomings - it indexes your domain model with the help of a few annotations, takes care of database/index synchronization and brings back regular managed objects from free text queries.
Hibernate Search is using Apache Lucene under the cover.
This version of Hibernate Search requires:
- Hibernate Core 4.3.x
- Apache Lucene 4.7.x
Include the following to your dependency list:
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-search</artifactId> <version>5.0.0.Alpha3</version> </dependency>
Download the distribution bundle from SourceForge and unzip to installation directory. Then read the documentation available in docs/reference.
> git clone email@example.com:hibernate/hibernate-search.git > cd hibernate-search > mvn clean install -s settings-example.xml
Per default the documentation is not built. To include it in the full build, run:
> mvn clean install -Pdocs -s settings-example.xml
To build the distribution bundle run:
> mvn clean install -Pdist -s settings-example.xml
If you want to run the performance test under integration/performance:
> mvn clean install -Pperf -s settings-example.xml
You can also build the above mentioned modules directly by changing into these directories and executing maven in the module directory.
If you want to contribute, you find all you need to know in Contributing to Hibernate Search
The project is split in several Maven modules.
backends: Remote backends receiving an indexing job and executing it via different protocols.
build-config: Code related artefacts like checkstyle rules.
distribution: Builds the distribution package.
documentation: The project documentation.
engine: Engine of the project. Most of the beef is here.
infinispan: Backend storing indexes in Infinispan.
integrationtest: Integration tests with various technologies like WildFly, Spring. Also include performance tests.
legacy: Old Maven GAV kept for backward compatibility.
modules: Integration with containers like WildFly.
orm: Native integration offering Hibernate Search for Hibernate ORM.
serialization: Serialization code used by remote backends.
testing: Various helper classes to write tests using Hibernate Search. This module is semi private.
This software and its documentation are distributed under the terms of the FSF Lesser GNU Public License (see lgpl.txt).