Skip to content

netgen/query-translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Query Translator

Build Status Code Coverage Downloads Latest stable License

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.

Use cases

  1. Common query language on top of multiple search backends
  2. Better control over options of the query language provided by the search backend
  3. Post-processing user's query input
  4. Customization of the query language
  5. ...

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.

Run the demo

  1. Clone the repository and position into it
  2. Generate autoloader using composer composer dump-autoload -o
  3. Start the web server with demo document root php -S localhost:8005 -t demo
  4. Open http://localhost:8005 in your browser

About

Query Translator is a search query translator with AST representation

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages