Skip to content

Latest commit

 

History

History

spring-boot-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Related Blog Posts

This application code demonstrates use of indexing and search capabilities of Spring Data Elasticsearch in a simple search application used for searching products in a product inventory. The main steps for running the application are:

  1. Start an Elasticsearch Instance by running the Docker run command:
docker run -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.0
  1. Clone the application and change the current directory to application root.
  2. Build the application with Maven
mvn clean package
  1. Start the application
java -jar target/<application>.jar
  1. The productindex will be built during application start up.
  2. Access the application with URL: http://localhost:8080/search
  3. Start to input some characters in the search box(examples: toy, white shirt, jacket, etc), which will open an auto-complete box of maximum 5 suggestions.
  4. Complete the search text and click search button to see the search results.