Below is a document struct form one of our collect...
# community-help
k
Below is a document struct form one of our collection,
Copy code
{
  "results": [
    {
      "facet_counts": [],
      "found": 1,
      "hits": [
        {
          "document": {
            "_last_modified_at": 1753537819479,
            "description": "A blackout forces a young writer to face her crippling fear of the dark as she realizes that an evil is lurking inside her home.",
            "duration": 420,
            "genres": [
              "Horror",
              "Thriller"
            ],
            "quality": [
              "HD"
            ],
            "ratings": [
              {
                "rating": "TV-G",
                "source": "alt-tv-rating"
              },
              {
                "rating": "G",
                "source": "mpaa"
              }
            ],
            "release_year": 2017,
            "type": "short",
            "writer": []
          },
          "highlight": {},
          "highlights": []
        }
      ],
      "out_of": 19,
      "page": 1,
      "request_params": {
        "collection_name": "titles",
        "first_q": "*",
        "per_page": 10,
        "q": "*"
      },
      "search_cutoff": false,
      "search_time_ms": 1
    }
  ]
}
How we can use filter_by query to search "ratings->source" and "ratings->rating" ? I used below but looks its not enough
Copy code
{
  "searches": [
    {
      "q": "*",
      "query_by": "",
      "filter_by": "ratings.{rating:=G && source:=mpaa}",
      "sort_by": "",
      "exclude_fields": ""
    }
  ]
}
Returning below response,
Copy code
{
  "results": [
    {
      "code": 400,
      "error": "Could not find a filter field named `ratings.{rating` in the schema."
    }
  ]
}
f
Which version of Typesense are you on?
k
its docker image tag 26.0.
does 26.0 not support that syntax, Do I need to upgrade ?
f
Yup, this syntax was introduced in v29.0
k
Ok. Thanks
But still getting same error.
Copy code
curl -X GET <http://localhost:8108/debug>
{"state":1,"version":"29.0"}
Request Body :
Copy code
{
  "searches": [
    {
      "q": "*",
      "query_by": "",
      "filter_by": "ratings.{source:=mpaa}",
      "sort_by": "",
      "exclude_fields": "description_embedding,tags_embedding"
    }
  ]
}
Same Error :
Copy code
{
  "results": [
    {
      "code": 400,
      "error": "Could not find a filter field named `ratings.source` in the schema."
    }
  ]
}
f
Could you provide a reproducible example like this one? https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b/
k
Ok Shall try to prepare one and Share. But I do have another Q. Is that feature limited only to search, but multi_search ? Because I am using
Copy code
http://{{TYPESENSE_SERVER}}:{{TYPESENSE_PORT}}/multi_search?collection=titles_20250804
Body :
Copy code
{
  "searches": [
    {
      "q": "*",
      "query_by": "",
      "filter_by": "ratings.{source:=mpaa}",
      "sort_by": "",
      "exclude_fields": "description_embedding,tags_embedding"
    }
  ]
}
Hi @Fanis Tharropoulos thanks for your support. I thinks we got the issue. We made a mistake while creating the collection. It need a explicitly defined field with type object.