Hello everyone, I have a question regarding prefi...
# community-help
d
Hello everyone, I have a question regarding prefix filtering and symbols_to_index. So I have documents with a field path:
Copy code
['name' => 'path', 'type' => 'string', 'optional' => true, 'sort' => false],
A path is the ids of its mapping through the category tree separated by a |. So something like 2|13|113. Therefore I added to the document.
Copy code
'symbols_to_index' => ['|']
To my
filter_by
I'm adding the following statement. However it does not provide me the right results.
path:=10 || path:=10|*
So basically I want to receive any category that is part of the tree which is started by category with id 10. Somehow I just receive like 3 or 4 results instead of all 50 categories. Does the prefix not working with special characters like |? I also tried it with a
.
or
_
. Any help would be much appreciated! Thanks in advance
1
j
Could you try surrounding the filter value with backticks and also try increasing this parameter on the latest RC build `28.0.rc35`: https://github.com/typesense/typesense/issues/1659#issuecomment-2418395150
Copy code
path:=10 || path:=`10|*`
If you can still replicate the issue, could you post a comment in that GitHub issue with a minimal set of reproduction steps like in this gist: https://gist.github.com/jasonbosco/7c3432713216c378472f13e72246f46b