{"repo":"netgen/query-translator","free":true,"listed":false,"github":"https://github.com/netgen/query-translator","clone":"git clone https://github.com/netgen/query-translator.git","description":"Query Translator is a search query translator with AST representation","language":"PHP","stars":206,"topics":["php","search","query","tokenizer","parser","generator","translator","ast","solr","edismax"],"license":"MIT","category":"databases-storage","readme_excerpt":"Query Translator Query Translator takes a search string as user input and converts it into something a search backend can understand. Technically, it's a search query translator) with abstract syntax tree representation. From the produced syntax tree, translation target can be anything you need. Usually it's a search backend, like Solr and Elasticsearch, or a database abstraction layer. A set of interfaces for implementing a language processor is provided, with a single implemented language named Galach. Galach implements a syntax that is based on what seems to be the unofficial standard for search query as user input. Quick cheat sheet: word \"phrase\" (group) +mandatory -prohibited AND && OR NOT ! #tag @user domain:term Error handling User input means you have to expect errors and handle them gracefully. Because of that, the parser is completely resistant to errors. Syntax tree will contain detailed information about corrections applied to make sense of the user input. This can be useful to clean up the input or implement rich input interface, with features like suggestions, syntax highlighting and error feedback. Customization The implementation was made with customization in mind. You can change the special characters which will be used as part of the syntax, pick out elements of the language you want to use, implement your own term clauses, or change how the syntax tree is converted to the target output. Some use cases - User-level query language on top of your search back","default_branch":null,"files":null,"tree":[],"storefront":"/r/netgen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/netgen/query-translator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}