Description
Query Translator is a library that takes a search string typed by a user and converts it into a form a search backend can use. It parses the input into an abstract syntax tree, and the target output can be anything you need, such as a query for Solr, Elasticsearch or a database abstraction layer. The parser is resistant to errors: the tree records the corrections it made to the input, which helps with cleaning up input and building suggestions, syntax highlighting and error feedback. The project includes one language, called Galach, which follows the unofficial standard for search input and supports words, quoted phrases, groups, mandatory and prohibited terms, AND, OR and NOT, #tags, @users and domain:term clauses. You can change the special characters, choose which language elements to use, add your own term clauses, or change how the tree becomes output. The README includes a demo you can run.…
Highlights
- Parses user search input into a syntax tree
- Error-tolerant parser
- Galach syntax with phrases, groups and operators
- Output to Solr, Elasticsearch or databases
- Customizable syntax and term clauses
Ratings & Reviews
No ratings yet
Be the first to rate Query Translator.
People also visit

j4c0bs/mcp-server-sql-analyzer
SQL analysis, linting and dialect conversion using SQLGlot
Query Translator FAQ
What does Query Translator do?
It converts a user's search string into a syntax tree, which can then be turned into a query for a search backend.
Which search backends does it target?
The README names Solr, Elasticsearch and database abstraction layers as typical targets.
What search syntax does it understand?
Galach supports words, quoted phrases, groups, plus and minus for mandatory and prohibited terms, AND, OR, NOT, #tags, @users and domain:term.
How does it handle bad input?
The parser keeps going when input has errors, and the syntax tree records the corrections it applied.
Can I change the syntax?
Yes. You can change the special characters, pick the language elements you want, and implement your own term clauses.
What are the best Query Translator alternatives?
Popular alternatives to Query Translator include SC Translator CRX, Buzee Tauri and TranslateYou. See all Query Translator alternatives






