Selasa, 18 September 2018

script elasticsearch : tambah hapus lihat (add delete)


elasticsearch 2.4 :
- per id : http://localhost:9200/index(index)/pemda(document)/D489(id)?pretty
- per document : http://localhost:9200/index/aktivitas_realisasi/_search
- limit record/page : http://localhost:9200/index/aktivitas_pp/_search?from=0&size=20
- melihat semua document : http://localhost:9200/index/_mapping?pretty=true
- membuat index baru : http://localhost:9200/index_test?pretty=true (method put)
- hapus satu index : http://localhost:9200/index_test?pretty=true (method delete)
- membuat document : http://localhost:9200/index_test_lagi/document?1pretty=true (method pos)
- memeriksa satu document : http://localhost:9200/index_test_lagi/document/1?pretty=true
- menghapus 1 document : http://localhost:9200/index_test_lagi/document/1=true (method delete)
- insert bulk : http://localhost:9200/index_test_lagi/document/_bulk?pretty&refresh (post)
- count jumlah semua index : http://localhost:9200/index_test_lagi/_count?pretty=1
- memeriksa semua dokumen : http://localhost:9200/index_test_lagi/document/_search?pretty=true
- search berdasarkan nama field : http://localhost:9200/katalog_test/document_test/_search?q=nama:Jasuindo

console :
- delete index : curl -XDELETE localhost:9200/nama_index (tanpa http dan di local server/tempat elastic di install)

elasticsearch 7.10 :
- menghapus 1 document : http://localhost:9200/index_test_lagi/_doc/product_619931(method delete)

Tidak ada komentar:

Posting Komentar