Search API (#350)

This commit is contained in:
Dominic Wong
2022-01-07 09:58:10 +00:00
committed by GitHub
parent 0f00267922
commit a093abaf5e
16 changed files with 2388 additions and 134 deletions

View File

@@ -1,14 +1,104 @@
{
"vote": [
"index": [
{
"title": "Vote for the API",
"title": "Index a document",
"run_check": false,
"request": {
"message": "Launch it!"
"index": "customers",
"document": {
"id": "1234",
"contents": {
"name": "John Doe",
"age": 37,
"starsign": "Leo"
}
}
},
"response": {
"message": "Thanks for the vote!"
}
}
],
"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": {}
}
]
}