-
-
Save karmi/5124043 to your computer and use it in GitHub Desktop.
An example of request definitions in external files.
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
{ "index" : { "_index" : "myindex", "_type" : "document", "_id" : "1" } } | |
{ "title" : "Jumping High" } | |
{ "index" : { "_index" : "myindex", "_type" : "document", "_id" : "2" } } | |
{ "title" : "Diving Deeper" } |
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 -X DELETE localhost:9200/myindex | |
curl -X POST localhost:9200/myindex --data @settings.json | |
curl -X POST localhost:9200/myindex/_bulk?refresh --data-binary @data | |
curl localhost:9200/myindex/_search?pretty -d '{ | |
"query" : { | |
"match" : { | |
"title" : "jump" | |
} | |
} | |
}' |
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
{ | |
"settings" : { | |
"index" : { | |
"number_of_shards" : 1 | |
} | |
}, | |
"mappings" : { | |
"document" : { | |
"properties" : { | |
"title" : { | |
"type" : "string", "analyzer" : "snowball" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where we store settings.json file?