Skip to content

Cosmo2357/elastic_express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ElasticSearch Example

Start

docker-compose up
npm run dev

ElasticSearch

http://localhost:9200

Kibana

http://localhost:5601

dev tools

http://localhost:5601/app/dev_tools#/console

Elasticsearch Node.js client

https://github.com/elastic/elasticsearch-js

ElasticSearch CRUD

https://www.elastic.co/guide/en/elasticsearch/reference/current/full-text-queries.html

Logstash

https://www.elastic.co/jp/logstash

POST

// ドキュメントだけつくる
PUT [:index_name]

POST & PUT

// 自動でIDが生成される
POST [:index_name]/_doc
{
  "field": "value"
}
// 自分でIDを決める。_docは上書きされる
PUT [:index_name]/_doc/[:id]
{
  "field": "value"
}
// _createを使うと上書きされない
PUT [:index_name]/_create/[:id]
{
  "field": "value"
}

GET

GET [:index_name]/_doc/[:id]

About

🍡 ElasticSearch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published