Search
Search in collection
Search a collection for string matches.
The specified search query is ran for the collection. If there are too many results, the cursor id can be used to obtain the remaining results.
Note: This API is applicable for collections with search capability enabled. For user created views, use C8QL query to run search operation.
post/_fabric/{fabric}/_api/search
Request
- The document declares no server URL.
- Auth
- API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
fabricstring string required
The name of the fabric.
Request body
Example request
{
"collection": "my_collection",
"search": "filter doc.URL== @URL Return doc",
"bindVars": {
"URL": "https://www.macrometa.com/"
},
"ttl": 60
}Response
Successfully fetched search results.
Example response
{
"code": 200,
"count": 1,
"result": [
{
"URL": "https://www.macrometa.com/",
"_id": "server_list/62487646",
"_key": "62487646",
"_rev": "_dcf-QQO--_"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.