flowpack/simplesearch

Letzte Aktivität 29 Mar 2022 22 16 23092
composer require flowpack/simplesearch

Plain PHP search engine using sqlite3 or MySQL as storage backend.

5.0.1

Version
5.0.1
Type
neos-package
Release Date
Mar 29, 2022 16:26
Source
git
Distribution
zip
Requires
  • neos/flow: ^5.0 || ^6.0 || ^7.0 || ^8.0 || dev-master
MIT 6a8c1f84cce592afe0ca7587f73e65ee1a80e7d5

SensioLabs Insight Code Climate

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.

Code and API are still pretty rough. I just implemented the minimum version. A higher level query API will follow (see the ContentRepositoryAdaptor for the direction).

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.

The content of the readme is provided by Github
The same vendor provides 49 package(s).