Hi <@U01PL2YSG8L>, <@U01NZ4D0LDD> Can I filter sea...
# community-help
s
Hi @Kishore Nallan, @Jason Bosco Can I filter search result for string using following scenario: 1. Contains with "" 2. Start with ""
k
For contains check on the infix query option. However you need to enable that index during collection creation and it can be quite performance intensive. Starts with is supported by prefix search which is enabled by default.
s
Copy code
{
  "accessible_to_user_ids": [
    "923e691f-0eb3-412c-b46c-3926dd33a29c",
    "b54fef2d-27a4-4926-a3fa-64aba5c4f89b"
  ],
  "ca": "2023-04-19T09:05:18.133336Z",
  "comments": [],
  "created_at": 0,
  "description": "",
  "id": "c25c3a95-f126-4bb3-b7a4-17a9e41d9fd8",
  "labels": [
    "Donna"
  ],
  "labels_id": [
    "207ea014-b787-417e-aa15-5cc9a306a79c"
  ],
  "name": "Susan White",
  "opening_id": "4ecf3c24-560b-4821-a427-e2df399f3d0b",
  "opening_name": "Test data",
  "sys_org_id": "0db9d32b-e9b9-4578-9c5c-5fc4260f1fd2",
  "ua": "2023-04-19T09:05:18.133336Z",
  "updated_at": 0
}
This is my document and below is search query:
Copy code
{
  "q": "su",
  "query_by": "name",
  "filter_by": "opening_name:ta"
}
I want to search result that name start with "su" and filter_by with opening_name that contains "ta". but it gets empty result.
k
You can only do exact searching on filters