Skip to content

Commit 368a059

Browse files
committed
updated read.me
1 parent 67b4cbe commit 368a059

File tree

1 file changed

+25
-1
lines changed
  • spring-boot/spring-boot-elasticsearch

1 file changed

+25
-1
lines changed

spring-boot/spring-boot-elasticsearch/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,28 @@
22

33
* [How to use Elasticsearch with Spring Data](https://reflectoring.io/springboot-elasticsearch/)
44

5-
In this blog, we will use Spring Data Elasticsearch to highlight the main capabilities of Elasticsearch - indexing of documents and searching and finally build a simple search application for searching products in a product inventory.
5+
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:
6+
7+
1. Start an Elasticsearch Instance by running the Docker `run` command:
8+
9+
```shell
10+
docker run -p 9200:9200 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.0
11+
```
12+
13+
2. Clone the application and change the current directory to application root.
14+
3. Build the application with Maven
15+
16+
```shell
17+
mvn clean package
18+
```
19+
4. Start the application
20+
21+
```shell
22+
java -jar target/<application>.jar
23+
24+
```
25+
5. The productindex will be built during application start up.
26+
6. Access the application with URL: http://localhost:8080/search
27+
7. 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.
28+
8. Complete the search text and click search button to see the search results.
29+

0 commit comments

Comments
 (0)