Skip to content

Latest commit

 

History

History
65 lines (58 loc) · 1014 Bytes

sample_global.rest

File metadata and controls

65 lines (58 loc) · 1014 Bytes

// Global definitions of the queries http://localhost:9200 Accept: application/json --

# # View nodes status # -- GET /_cat/nodes?v

# # Add a new doc to the new 'testindex' and 'testtype' # -- POST /testindex/testtype {

"name": "some name", "value": "some value", "date": "2015-01-01"

}

# # Search 'testindex' # -- GET /testindex/_search?pretty

# # View mapping. # -- GET /testindex/testtype/_mapping?pretty

# # Lite search from a different host. # http://localhost:9200

GET /testindex/testtype/_search?pretty q=+name:FOO +value:(FOO BAR)

# # Full-body search # -- POST /testindex/_search?pretty {

"query": {
"filtered": {
"filter": {
"range": {
"date": {
"gte": "2015-01-06", "lte": "2015-01-08"

}

}

}, "query": {

"match": {
"value": "FOO"

}

}

}

}

}