https://github.com/flowpack/flowpack.simplesearch
A simple php/sqlite search engine for generic data.
https://github.com/flowpack/flowpack.simplesearch
Last synced: 11 months ago
JSON representation
A simple php/sqlite search engine for generic data.
- Host: GitHub
- URL: https://github.com/flowpack/flowpack.simplesearch
- Owner: Flowpack
- License: mit
- Created: 2014-04-20T18:23:47.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2025-03-15T07:50:35.000Z (about 1 year ago)
- Last Synced: 2025-03-29T16:11:14.254Z (12 months ago)
- Language: PHP
- Homepage:
- Size: 115 KB
- Stars: 22
- Watchers: 4
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flowpack.SimpleSearch
[](https://packagist.org/packages/flowpack/simplesearch) [](https://packagist.org/packages/flowpack/simplesearch)
A simple php search engine based on SQLite or MySQL. Performance is acceptable but
decreases quickly with the amount of entries.
Depending on the queries you want to perform a sane upper limit is somewhere around
50000 entries (for SQLite).
This package has no hard dependencies on anything so could be used in any project.
If you look at the code the sqlite storage of properties looks pretty strange but
with SQlite3 the actual storage type is determined per row, so a column can contain
different data types in each row. That should make all those empty rows more or less
acceptable. We are trying to mimic a document database here after all.
## Using MySQL
To use MySQL, switch the implementation for the interfaces in your `Objects.yaml`
and configure the DB connection as needed:
Flowpack\SimpleSearch\Domain\Service\IndexInterface:
className: 'Flowpack\SimpleSearch\Domain\Service\MysqlIndex'
Neos\ContentRepository\Search\Search\QueryBuilderInterface:
className: 'Flowpack\SimpleSearch\ContentRepositoryAdaptor\Search\MysqlQueryBuilder'
Flowpack\SimpleSearch\Domain\Service\MysqlIndex:
arguments:
1:
value: 'Neos_CR'
2:
value: 'mysql:host=%env:DATABASE_HOST%;dbname=%env:DATABASE_NAME%;charset=utf8mb4'
properties:
username:
value: '%env:DATABASE_USERNAME%'
password:
value: '%env:DATABASE_PASSWORD%'
The `arguments` are the index identifier (can be chosen freely) and the DSN.