Skip to content

kgromov/elasticsearch-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Useful commands:

  • List all indexes: curl -XGET 127.0.0.1:9200/${indexName}/_cat/indices
  • add mapping: curl -XPUT -H "Content-Type: application/json" 127.0.0.1:9200/${indexName} --data-binary @${filePath}.json
  • load data from .json file: curl -XPOST -H "Content-Type: application/json" 127.0.0.1:9200/${indexName}/_bulk --data-binary @${filePath}.json
  • delete index: curl -X DELETE "localhost:9200/${indexName}?pretty"

TODO - move to Docker/docker compose

docker run -p 9200:9200 -p 9300:9300 -e dicsovery.type="single-node" docker/elasticsearch/elasticsearch:7.13.3

About

Spring boot demo project which shows how to use elasticsearch with spring-data abstraction on top

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages