Vamshi Aruru
10/12/2023, 8:19 AMfilter_by="field_1:{{.field_1} && field_2:!={{.field_1}}"
Now at run time, I want to be able to populate this template based on the values from a particular document. Now I can do all that fairly easily, but the problem is what happens if the document doesn't contain say field_1
. In that case I want to be able to provide a value that basically makes typesense ignore that specific filter of filter_by. Is there a way to that? Perhaps maybe a special symbol like *
or something?
I understand this is a very niche requirement, but I was wondering if there was a way to accomplish this. If I was able to parse the filter_by into a syntax tree like structure, I could traverse the tree and prune the branches with specific fields, but I am not sure how to do that either. Does typesense have a filter_by parser I can use?
Thanks for the help!