Complex Query System and Collections Schema for Typesense
TLDR Orion asks about the grammar for 'filter_by' search parameters and where to find a collections schema. Jason provides the needed documentation and encourages Orion to share back.
Jun 30, 2023 (5 months ago)
Is there a formal grammar for
filter_byor any of the search parameters? I am working on a complex query system which takes a query language, validates and parses it, then constructs typesense queries from the syntax tree. Doing this without knowing the precise filtering grammar (or other params) is quite a challenge. At the moment I've taken all the documented examples and tried to formalise them into PEG and BNF grammars but I would love to be more confident that it matches.
Second (much more mundane) question, is there any way to programmatically get a collections schema? I'm using the schema to inject some more intelligent behaviour into the query system so that things like filtering
tags > 5throws a useful syntax error in the frontend. I can copy-paste the schema when it changes but I would really love to avoid that.
filter_byin this table
Yup. Using this GET endpoint
Indexed 3005 threads (79% resolved)
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.
Resolving Typesense Analytics "top_queries" Collection Issue
Zain faced issues with typesense analytics and an empty "top_queries" collection. Jason and Kishore Nallan assisted in troubleshooting, identified a bug, and suggested a fix in `0.25.0.rc66`. The fix worked for Zain.
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.
Solving Typesense Cloud Interface Issue in Python
Orion had an issue querying from Python in the Typesense Cloud interface. Kishore Nallan identified the problem within the array declaration. They then discussed improving error messages and Orion offered to make a PR.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.