Issue with Special Characters in Facet Names
TLDR arif faced a problem with special characters, specifically colons, in facet names. Kishore Nallan advised using a-zA-Z0-9_ as the safest subset and confirmed no workaround for field names.
May 17, 2023 (7 months ago)
arif
09:18 AMThe issue is when the dynamic portion of the facet-name contains a colon,
:
. For example: prefix.a:b
. Then if I try to use filter_by
on it like prefix.a:b:=c
it gives an error like "Could not find a filter field named prefix.a
in the schema.". Now the questions1. Is there any way to overcome this issue? Note: I'm using the Typesense Instantsearch Adapter in the front-end
2. Is there a way to know which special characters I should be aware about?
Thanks!
Kishore Nallan
09:21 AMKishore Nallan
09:21 AMprefix.a%3Ab
Kishore Nallan
09:21 AM:
is used to split the field name from value.Kishore Nallan
09:22 AMKishore Nallan
09:22 AMarif
09:25 AMKishore Nallan
09:29 AMTypesense
Indexed 3015 threads (79% resolved)
Similar Threads
Handling Special Characters in Facets and Queries
Greg experienced issues with faceting on field values with special characters. Kishore Nallan suggested using the `symbols_to_index` configuration during collection creation to index the special characters.
Issue with Typesense, Facets, and Special Characters
Ailish is encountering an issue with Typesense handling of apostrophes versus single quotes. Jason clarified how Typesense handle special characters and requested further specifics from Ailish.
Issue with Colons in Refinement-List Values
Mr faced an error with colons in values of a refinement-list. Jason suggested a workaround of avoiding colons and making a Github issue for tracking the problem. Mr resolved it with a regex exclusion.
Faceting Objects in Typesense
John wants to facet objects in Typesense, but faces issues. Kishore Nallan suggests creating a feature request on GitHub.
Sanitizing Queries with Special Characters in Typesense
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.