Query Translator is a search query translator with abstract syntax tree representation. It takes a search query as a user input and converts it into something a specific search backend can understand. AST representation means that output of the parser is a hierarchical tree structure. It represents the syntax of the given query in an abstract way and it's easy to process using tree traversal.
Query language implementation is named Galach.
- Common query language on top of multiple search backends
- Better control over options of the query language provided by the search backend
- Post-processing user's query input
- Customization of the query language
- ...
This implementation is a library, meaning it doesn't intend to solve a specific use case for query translation. Instead, it's meant as a base that you can use in implementing such a use case.
- Clone the repository and position into it
- Generate autoloader using composer
composer dump-autoload -o - Start the web server with demo document root
php -S localhost:8005 -t demo - Open http://localhost:8005 in your browser