Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Hibernate Search | 478 | 840 | 55 | 14 hours ago | 141 | October 18, 2021 | 5 | other | Java | |
Hibernate Search: full-text search for domain model | ||||||||||
Springfilter | 174 | 2 days ago | 53 | March 03, 2023 | 3 | Java | ||||
Dynamically filter JPA entities and Mongo collections with a user-friendly query syntax. Seamless integration with Spring APIs. Star to support the project! ⭐️ | ||||||||||
Tweetarchive | 33 | 6 years ago | apache-2.0 | Java | ||||||
Hibernate Search and Spring Boot: Simple yet powerful archiving | ||||||||||
Grails Hibernate Search Plugin | 21 | 3 years ago | 12 | apache-2.0 | Groovy | |||||
Integrates Hibernate Search features to Grails | ||||||||||
Hsearch Es Demo | 21 | 7 years ago | 1 | apache-2.0 | Java | |||||
Hibernate Search and Elasticsearch demo | ||||||||||
Hibernate Search Example | 10 | 10 years ago | Java | |||||||
hibernate search example(分别使用hibernate、jpa两种方式实现,使用IKAnalyzer、paoding两种分词器实现中文分词) | ||||||||||
Query Search | 9 | 5 years ago | 1 | mit | Java | |||||
Make searching and pagination easy with Hibernate ORM using JPQL or SQL | ||||||||||
Vlad Cli | 8 | 3 years ago | 1 | JavaScript | ||||||
Command Line Interface to search Vlad's blog | ||||||||||
Hibernate_search_solr_integration | 8 | 4 years ago | 1 | Java | ||||||
Example of how to integrate hibernate search and solr together | ||||||||||
Jpa Generic Dao | 6 | 7 years ago | 1 | HTML | ||||||
JPA/Hibernate Generic DAO |
Hibernate Search automatically extracts data from Hibernate ORM entities to push it to local Apache Lucene indexes or remote Elasticsearch indexes.
It features:
For example, map your entities like this:
@Entity
// This entity is mapped to an index
@Indexed
public class Book {
// The entity ID is the document ID
@Id
@GeneratedValue
private Integer id;
// This property is mapped to a document field
@FullTextField
private String title;
@ManyToMany
// Authors will be embedded in Book documents
@IndexedEmbedded
private Set<Author> authors = new HashSet<>();
// Getters and setters
// ...
}
@Entity
public class Author {
@Id
@GeneratedValue
private Integer id;
// This property is mapped to a document field
@FullTextField
private String name;
@ManyToMany(mappedBy = "authors")
private Set<Book> books = new HashSet<>();
// Getters and setters
// ...
}
Index existing data like this:
SearchSession searchSession = Search.session( entityManager );
MassIndexer indexer = searchSession.massIndexer( Book.class );
indexer.startAndWait();
Listener-triggered indexing does not require any change to code based on JPA or Hibernate ORM:
Author author = new Author();
author.setName( "Isaac Asimov" );
Book book = new Book();
book.setTitle( "The Caves Of Steel" );
book.getAuthors().add( author );
author.getBooks().add( book );
entityManager.persist( author );
entityManager.persist( book );
And search like this:
SearchResult<Book> result = Search.session( entityManager )
.search( Book.class )
.where( f -> f.match()
.fields( "title", "authors.name" )
.matching( "Isaac" ) )
.fetch( 20 );
List<Book> hits = result.hits();
long totalHitCount = result.total().hitCount();
This software and its documentation are distributed under the terms of the GNU Lesser General Public License (LGPL), version 2.1 or later.
See the lgpl.txt
file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html.
A getting started guide is available in the reference documentation.
Fore more information, refer to the Hibernate Search website:
For offline use, distribution bundles downloaded from SourceForge also include the reference documentation for the downloaded version in PDF and HTML format.
See http://hibernate.org/search/documentation/.
See the HSEARCH project on the Hibernate JIRA instance: https://hibernate.atlassian.net/browse/HSEARCH.
See http://hibernate.org/community/.
New contributors are always welcome.
See CONTRIBUTING.md to get started.
The contribution guide also includes build instructions.