Sanitizing Queries with Special Characters in Typesense
TLDR Daniel asked about sanitizing queries containing special characters in Typesense. Kishore Nallan recommended using backticks for literal string values and fixing the schema for field names with special characters, sticking to alphanumeric and underscores.

Apr 25, 2023 (5 months ago)
Daniel
03:19 PMDoes Typesense have a good way of sanitizing the queries so that characters like this don't become a factor? Or do we have some way of boxing filters so that this isn't an issue?
Kishore Nallan
03:23 PMtitle: `Cup size (mm`
Daniel
03:24 PMDaniel
03:55 PM'filter_by': '`descriptors.Cup Size (mm`:=`4 x 5`'
(The field itself is typo'd, but we're finding that we're having issues even if there is both open and close parenthesis)
Daniel
03:56 PMDaniel
03:57 PMDaniel
04:01 PMDaniel
04:02 PMKishore Nallan
04:24 PMKishore Nallan
04:25 PMDaniel
05:20 PMApr 26, 2023 (5 months ago)
Daniel
01:29 AMI take it that parenthesis are bad, but are things like
=
and :
also an issue?Kishore Nallan
03:09 AM
Typesense
Indexed 2764 threads (79% resolved)
Similar Threads
Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.


Merging Results of Multi-Search Queries: Workarounds and Future Features
Julian wanted to merge results from two similar collections. Kishore Nallan confirmed it's a feature that might be implemented but hasn't been prioritised. Both Julian and robert plan to use client-side solutions for now.
Issue with Search Duration on Typesense Database
Robert reported an issue about query time delay when adding a `filter_by` constraint in a large Typesense database. Kishore Nallan explained that this happens due to the order of operation and also promised to look into this issue further. Robert withdrew his interest in sponsoring the improvement due to moving from the project.
Resolving Special Character Search Errors
suraj had issues searching for data containing special characters. Kishore Nallan resolved the issue by advising suraj to remove the parameters for 'preSegmentedQuery' and 'tokenSeparators'.

Moving from Algolia to Typesense: Questions and Answers
Juan sought advice from Kishore Nallan about moving from Algolia to Typesense, handling MultiSearch, setting parameters, checking imported documents, and a specific syntax query.
