Filtering by Boolean in JS SDK
TLDR Gustavo had trouble filtering by boolean in JS SDK. Kishore Nallan suggested using 'bool' instead of 'boolean', which resolved the issue.
Jun 04, 2023 (6 months ago)
Gustavo
07:29 PMfilter_by: 'blocked:=true'
, filter_by: 'blocked=true'
, filter_by: 'blocked:true'
, filter_by: 'blocked'
, and none of them worked. Why?Gustavo
07:33 PMJun 05, 2023 (6 months ago)
Kishore Nallan
01:44 PMGustavo
01:54 PMGustavo
02:06 PMGustavo
02:08 PM> RequestMalformed: Request failed with HTTP code 400 | Server said: Error with filter field
blocked
: Unidentified field data type, see docs for supported data types.Gustavo
02:10 PMKishore Nallan
02:15 PMGustavo
02:19 PMKishore Nallan
02:29 PMTypesense
Indexed 3011 threads (79% resolved)
Similar Threads
Resolving Error with JSON Boolean Field
GM faced an error with a JSON boolean field, Jason suggested checking the field definition. After using curl commands, GM realized the issue and discussed improving error messages.
Setting Typesense Schema to Return Boolean in Firestore
Rude needed help to make his firestore's typesense schema return boolean 'profileFinished' as true. Jason provided the correct instructions and resolved the issue.
Import Failure Issue with Booleans in Schema
Todd faced issues with document import due to booleans in the schema. Kishore Nallan helped diagnose the problem, which was solved by explicitly declaring the boolean in the schema.
Solving Bool Field Filtering Issue in Typesense
Guillermo was struggling with filtering by a bool field in Typesense. Jason assisted, and realized that Guillermo forgot to add the relevant field in the firebase-typesense extension configuration.
Sorting by Boolean Values in Typesense
Andrew sought to sort documents by Boolean value in Typesense. Jason indicated this is possible from `v0.24.0.rcn25` and recommended an upgrade for Typesense Cloud users.