#community-help

Typesense Search Parameters for String Type

TLDR Sandip asked how to search specific string types in Typesense. Jason clarified how to use search parameters for this purpose.

Powered by Struct AI

1

Aug 09, 2023 (4 months ago)
Sandip
Photo of md5-15d14f788c619474a46b8fb0c08210bb
Sandip
07:08 AM
Hi Kishore Nallan,
Could I receive search results that satisfy the following criteria for the string type:
1. Location field value ending with 'xyz'
2. Location field value containing 'xyz'"
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:51 PM
Typesense only supports matching strings that start with (prefix=true search parameter) or contains (called infix search, infix=true search parameter, and you need to set infix: true in the collection’s schema for that field to enable infix search).
Aug 10, 2023 (4 months ago)
Sandip
Photo of md5-15d14f788c619474a46b8fb0c08210bb
Sandip
04:42 AM
Thanks Jason 🙂

1