1.0.0 • Published 2 years ago

advsearch v1.0.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

ADVSearch

A simple advanced search parser/interpreter written in pure javascript/PHP. This has no external dependencies.

The general principle is that the compilation/linting of search terms can be done in a single pass on the front-end, before sending a neatly compiled array of search terms to the backend. Another single pass through the terms to turn them into a query, and search results can be returned to the front-end. This brushes the limit of what can be considered a DSL, but the principles are the same.

In order to use this effectively in your own tech stack, you'll likely need to reorganize this code, or (more likely) rewrite the php interface in your preferred language with your choice of ORM.

Credits

Copyright (c) Gavin Lochtefeld 2022.