Created
June 18, 2021 09:11
-
-
Save ronaldcurtis/9c8995d0f86bf5b95958239792abc3ce to your computer and use it in GitHub Desktop.
typesense_not_equal_filter_not_working
This file contains hidden or 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
docker run -p 8108:8108 -v /data typesense/typesense:0.21.0.rc15 --data-dir /data --api-key=dev | |
curl "http://localhost:8108/collections" \ | |
-X POST \ | |
-H "Content-Type: application/json" \ | |
-H "X-TYPESENSE-API-KEY: dev" \ | |
-d '{"name": "records", | |
"fields": [ | |
{ "name": "name", "type": "string" }, | |
{ "name": "user_id_facet", "type": "string", "facet": true } | |
] | |
}' | |
curl "http://localhost:8108/collections/records/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: dev" -d '{"name":"Number One", "user_id_facet": "1"}' | |
curl "http://localhost:8108/collections/records/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: dev" -d '{"name":"Number Two", "user_id_facet": "2"}' | |
curl -H "X-TYPESENSE-API-KEY: dev" http://localhost:8108/collections/records/documents/search\?q\=\*\&filter_by\=user_id_facet:-1 |
This file contains hidden or 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
docker run -p 8108:8108 -v /data typesense/typesense:0.21.0.rc15 --data-dir /data --api-key=dev | |
curl "http://localhost:8108/collections" \ | |
-X POST \ | |
-H "Content-Type: application/json" \ | |
-H "X-TYPESENSE-API-KEY: dev" \ | |
-d '{"name": "records", "num_memory_shards": 1, | |
"fields": [ | |
{ "name": "name", "type": "string" }, | |
{ "name": "user_id_facet", "type": "string", "facet": true } | |
] | |
}' | |
curl "http://localhost:8108/collections/records/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: dev" -d '{"name":"Number One", "user_id_facet": "1"}' | |
curl "http://localhost:8108/collections/records/documents" -X POST \ | |
-H "X-TYPESENSE-API-KEY: dev" -d '{"name":"Number Two", "user_id_facet": "2"}' | |
curl -H "X-TYPESENSE-API-KEY: dev" http://localhost:8108/collections/records/documents/search\?q\=\*\&filter_by\=user_id_facet:-1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment