This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Запрос 1: | |
POST tenders_2019/_doc/_search | |
{ | |
"_source": false, | |
"timeout": "3m", | |
"query": { | |
"bool": { | |
"filter": [ | |
{ | |
"bool": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE 'http://localhost:9200/app' | |
curl -XPUT 'http://localhost:9200/app' -d ' | |
{ | |
"settings": { | |
"index.number_of_shards": 1, | |
"index.number_of_replicas": 0 | |
}, | |
"mappings" : { | |
"parent": { | |
"properties" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE "http://localhost:9200/test/" | |
curl -XPUT "http://localhost:9200/test/" -d '{ | |
"mappings": { | |
"product": { | |
"properties": { | |
"doc": { | |
"properties": { | |
"name": { | |
"type": "string", | |
"include_in_all": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST http://localhost:9200/test/thing/1 -d '{ | |
"something": "/hello/world" | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Performing a has_child search on contacts" | |
curl -XGET 'http://localhost:9200/contact/_search?pretty=true' -d ' | |
{ | |
"query" : { | |
"filtered" : { | |
"query" : { | |
"match_all" : { } | |
}, | |
"filter" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"ok":true,"acknowledged":true} | |
{"ok":true,"acknowledged":true} | |
{"ok":true,"_index":"test","_type":"content","_id":"1","_version":1} | |
{"ok":true,"_index":"test","_type":"content","_id":"2","_version":1} | |
{"ok":true,"_shards":{"total":10,"successful":5,"failed":0}} | |
{ | |
"took" : 7, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete all pins | |
curl -X DELETE "http://localhost:9200/pins/pin" | |
# Create proper mapping | |
curl -XPUT 'http://localhost:9200/pins/pin/_mapping' -d ' | |
{ | |
"pin" : { | |
"properties" : { | |
"location" : { | |
"type" : "geo_point" |