Hello, is it possible to filter on an empty array ...
# community-help
r
Hello, is it possible to filter on an empty array value? I see multiple references saying it's not • https://typesense-community.slack.com/archives/C01P749MET0/p1643036171209200?thread_ts=1643036094.209100&cid=C01P749MET0https://typesense-community.slack.com/archives/C01P749MET0/p1710290190422519https://typesense-community.slack.com/archives/C01P749MET0/p1697157038826589?thread_ts=1697155901.814989&cid=C01P749MET0 But this GitHub issue https://github.com/typesense/typesense/issues/1890 seems to indicate that it is. If it is possible, then does it only work on
string[]
? I have an
object[]
and when I try to filter on
myarray:=[]
, I get back
Copy code
"message": "Error with filter field `myarray`: Unidentified field data type, see docs for supported data types."
j
It's still not possible to filter for documents that have an empty array. Issue 1890 is only for that filter syntax to not throw an error. It essentially becomes a no-op since no values are mentioned inside.
We were throwing a validation error when an empty array was specified in the filter string in some versions, and the fix just rolls back that validation
r
Thank you!
👍 1