Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl -XDELETE 'http://localhost:9200/test_search'
- curl -XPUT 'http://localhost:9200/test_search/' -d '
- {
- "mappings" : {
- "test_record" : {
- "properties" : {
- "name" : {
- "type" : "string"
- }
- }
- }
- }
- }'
- curl -XPUT 'http://localhost:9200/test_search/test_record/1' -d '{
- "name" : "brown fox jump over the lazy dog quick"
- }'
- curl -XPUT 'http://localhost:9200/test_search/test_record/2' -d '{
- "name" : "brown fox jump over the lazy quick dog"
- }'
- curl -XPUT 'http://localhost:9200/test_search/test_record/3' -d '{
- "name" : "quick brown fox jump over the lazy dog"
- }'
- curl -XGET 'http://localhost:9200/test_search/_search?pretty=true' -d '{
- "query": {
- "bool": {
- "must": [ ],
- "must_not": [ ],
- "should": [
- {
- "query_string" : {
- "default_field": "name",
- "query" : "quick"
- }
- }
- ]
- }
- }
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement