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
3
1mo
Solved
Aug 09, 2023 (1 month ago)
Sandip
Sandip
07:08 AMHi 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'"
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
Jason
03:51 PMTypesense 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 (1 month ago)
Sandip
Sandip
04:42 AMThanks Jason 🙂
1
Typesense
Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI
Indexed 2779 threads (79% resolved)
Similar Threads
Partial search filtering
Jason asked about partial match searching in Typesense similar to SQL's LIKE. Jason explained that Typesense has "prefix search" by default but "infix search" can be done by setting the search parameters.
4
8mo
Solved
Typesense Infix Search for Partial Word Matching
Eric needed help with Typesense infix search for partial word matching. Kishore Nallan advised to enable it through infix: true in the collection schema.
2
6mo
Solved
Enabling Infix Search for Docsearch on Typesense
Vladimir wanted to enable infix search in typesense docsearch. Jason suggested adding `infix` as a parameter and enabling it in the collection schema by forking the typesense-docsearch scraper.
2
16mo
Solved