mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-12 19:25:16 +00:00
105 lines
2.0 KiB
JSON
105 lines
2.0 KiB
JSON
{
|
|
"index": [
|
|
{
|
|
"title": "Index a document",
|
|
"run_check": false,
|
|
"request": {
|
|
"index": "customers",
|
|
"document": {
|
|
"id": "1234",
|
|
"contents": {
|
|
"name": "John Doe",
|
|
"age": 37,
|
|
"starsign": "Leo"
|
|
}
|
|
}
|
|
},
|
|
"response": {
|
|
}
|
|
}
|
|
],
|
|
"search": [
|
|
{
|
|
"title": "Search for a document",
|
|
"run_check": false,
|
|
"request": {
|
|
"index": "customers",
|
|
"query": "name == 'John'"
|
|
},
|
|
"response": {
|
|
"documents": [
|
|
{
|
|
"id": "1234",
|
|
"contents": {
|
|
"name": "John Doe",
|
|
"age": 37,
|
|
"starsign": "Leo"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "Search on multiple fields (AND)",
|
|
"run_check": false,
|
|
"request": {
|
|
"index": "customers",
|
|
"query": "name == 'John' AND starsign == 'Leo'"
|
|
},
|
|
"response": {
|
|
"documents": [
|
|
{
|
|
"id": "1234",
|
|
"contents": {
|
|
"name": "John Doe",
|
|
"age": 37,
|
|
"starsign": "Leo"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"title": "Search on multiple fields (OR)",
|
|
"run_check": false,
|
|
"request": {
|
|
"index": "customers",
|
|
"query": "name == 'John' OR name == 'Jane'"
|
|
},
|
|
"response": {
|
|
"documents": [
|
|
{
|
|
"id": "1234",
|
|
"contents": {
|
|
"name": "John Doe",
|
|
"age": 37,
|
|
"starsign": "Leo"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"delete": [
|
|
{
|
|
"title": "Delete a document",
|
|
"run_check": false,
|
|
"request": {
|
|
"id": "1234",
|
|
"index": "customers"
|
|
},
|
|
"response": {}
|
|
}
|
|
],
|
|
"deleteIndex": [
|
|
{
|
|
"title": "Delete an index",
|
|
"run_check": false,
|
|
"request": {
|
|
"index": "customers"
|
|
},
|
|
"response": {}
|
|
}
|
|
]
|
|
}
|