Last active
February 5, 2023 15:39
-
-
Save satish860/ab67c61a66b942645b1300053a67f029 to your computer and use it in GitHub Desktop.
Mapping Curl FIle
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 --request POST \ | |
--url http://localhost:8108/collections \ | |
--header 'Content-Type: application/json' \ | |
--header 'X-TYPESENSE-API-KEY: Hu52dwsas2AdxdE' \ | |
--data '{ | |
"name":"movies", | |
"fields": [ | |
{"name":"code","type":"int32","index":true}, | |
{"name":"title","type":"string","index":true}, | |
{"name":"title_suggest","type":"string[]","index":true}, | |
{"name":"genre","type":"string[]","index":true,"facet":true}, | |
{"name":"director","type":"string","index":true,"facet":false}, | |
{"name":"actors","type":"string[]","index":true,"facet":false}, | |
{"name":"description","type":"string","index":true,"facet":false}, | |
{"name":"year","type":"int32","index":true,"facet":false}, | |
{"name":"runtime","type":"string","index":true,"facet":false}, | |
{"name":"rating","type":"float","index":true,"facet":false}, | |
{"name":"votes","type":"int32","index":true,"facet":true}, | |
{"name":"revenue","type":"string","index":true,"facet":false}, | |
{"name":"metascore","type":"int32","index":true,"facet":false,"optional":true}, | |
{"name":"certificate","type":"string","index":true,"facet":false}, | |
{"name":"avatar","type":"string","index":true,"facet":false} | |
], | |
"default_sorting_field":"rating" | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment