Hi Team, Filter query issue in the nested object a...
# community-help
b
Hi Team, Filter query issue in the nested object array field. Here is the sample data in that collection [ { "code": "test", "id": "1", "serialRange": [ { "startSerialHash": 100, "endSerialHash": 200 }, { "startSerialHash": 300, "endSerialHash": 400 } ] } ] Search query { "q": "*", "query_by": "code", "filter_by": "serialRange.startSerialHash:=*250* && serialRange.endSerialHash:=*250*", "page": 1, "per_page": 10 } It is supposed not to return any results. But returning 1 result by evaluating serialRange.startSerialHash:=250 from serialRange[0] and serialRange.endSerialHash:=250 from serialRange[1]. Could you please help on resolving this issue.
j
This style of filtering within properties inside an array of objects is not supported at the moment. We're tracking this as a feature request here: https://github.com/typesense/typesense/issues/828
👍 1
You want to instead create one document for each object inside the array of objects and then you should be able to filter as usual
b
Appreciate your response.
👍 1