#community-help

How to Filter search Result in Candidates Schema

TLDR Sandip sought clarification on filtering search results by 'custom.experience' in a schema. Jason affirmed its possibility, and Sandip confirmed it works.

Powered by Struct AI

1

3
3mo
Solved
Join the chat
Aug 25, 2023 (3 months ago)
Sandip
Photo of md5-15d14f788c619474a46b8fb0c08210bb
Sandip
04:34 PM
Hi Kishore Nallan, Jason
"ts_schema": {
            "enable_nested_fields": true,
            "fields": [
                {
                    "facet": true,
                    "infix": true,
                    "name": "custom",
                    "optional": true,
                    "type": "object"
                },
            ]
}

This is schema for candidates, here I have added custom field with object type and below i have attached document example:
 {
      "id": "b7cdea33-fba9-4d98-a32d-28bac77eda79",
       "custom": {
                    "Bye": "dwqas",
                    "Location": "dqwas",
                    "hello": "heds"
                    "experience": 6
                },
               
 }

Can I filter search result like:
{
"q": "*",
"filter_by":"custom.experience"<6
}
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:05 PM
Yup, you can do this
Sandip
Photo of md5-15d14f788c619474a46b8fb0c08210bb
Sandip
05:46 PM
Just check, it works🙂
Thanks.

1