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 (7 months ago)
Does 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 Nallan03:23 PM
title: `Cup size (mm`
'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)
Kishore Nallan04:24 PM
Kishore Nallan04:25 PM
Apr 26, 2023 (7 months ago)
I take it that parenthesis are bad, but are things like
:also an issue?
Kishore Nallan03:09 AM
Indexed 3011 threads (79% resolved)
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.
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.