-
-
Save kishorenc/769bd7606041d5c1e219ba87bdc2a7cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -k "http://localhost:8108/collections" -X POST -H "Content-Type: application/json" \ | |
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{ | |
"name": "docs", | |
"fields": [ | |
{"name": "title", "type": "string" } | |
] | |
}' | |
curl "http://localhost:8108/collections/docs/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{"title": "Title 1"}' | |
curl "http://localhost:8108/collections/docs/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{"title": "Title 2"}' | |
# Return 2 hits because providing `per_page` outside is not supported | |
curl 'http://localhost:8108/multi_search' -H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" --data-raw '{ | |
"per_page": 1, | |
"searches":[ | |
{ | |
"q":"*", | |
"collection": "docs" | |
} | |
] | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment