Skip to content

Netz00/hibernate-search-6-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibernate Search 6 Example

Simple Spring Boot application demonstrating Hibernate Search 6 usage with Elasticsearch.

Hibernate Search 6.1.7.Final: Reference Documentation

Example app

ER diagram:

ER diagram

Full text search is available for Freelancer and Project entities.

Indexing Entities

3 search examples:

  • searchProjectsEntities demonstrates basic full text search of projects by

    • project name
  • searchProjects demonstrates previous example with projections usage

  • searchFreelancers demonstrates full text search of freelancers (with projections) by

    • username
    • first name
    • last name
    • categories (M:N relationship)

Creating custom edgeNgram analyser

Running

Before running Spring Boot application start necessary Docker containers with the following commands:

  • Start development environment with: docker compose -f deployment/docker-compose-dev.yaml up -d

  • Stop development environment with: docker compose -f deployment/docker-compose-dev.yaml down

Run tests with the following command:

newman run ./backend/src/test/postman/Hibernate-search-6-example.postman_collection.json -e ./backend/src/test/postman/Test\ Environment.postman_environment.json --reporters cli,json --reporter-json-export ./backend/src/test/postman/output/outputfile.json

Import postman collection from here

Elasticsearch browser extension: https://elasticvue.com/


Extras