psvneo/sw-plugin-advanced-search

This package is abandoned and no longer maintained. No replacement package was suggested.

1.0.0 2019-11-07 15:18 UTC

This package is auto-updated.

Last update: 2022-04-13 09:08:58 UTC


README

How it works

This plugin hooks into the search process and enriches the search result with additional data. To provide additional data, you have to create an indexer. The plugin collect those indexers using the service tag mechanism.

How to add an custom indexer

To add an custom indexer, you have to register a service in your services.xml.

<service class="Vendor\Component\Indexer\MyCustomIndexer" id="my.service.id">
    <argument type="service" id="dbal_connection"/>
    <tag name="psvneo_advanced_search.indexer"/>
</service>

The tag psvneo_advanced_search.indexer is really important. You class Vendor\Component\Indexer\MyCustomIndexer must implement the interface \PSVneoAdvancedSearch\Component\Indexer\IndexerInterface.

A good example is the PageIndexer.

How to index

To index records, there is a symfony command. simply run:

bin/console psvneo:search:index