cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
125 stars 67 forks source link

make entities searchable by solr #234

Closed cbleek closed 8 years ago

cbleek commented 8 years ago

create a new module named "Solr". The module should hook into the doctrine update and send the entity data to a solr server. In addition, if a search is performed, it should provide a paginator, which searches the solr server

@TiSiE : can you add som technical details, please?

TiSiE commented 8 years ago

Doctrine provides its own event system. Examples in YAWIK are: Applications\Repository\Event\JobReferencesUpdateListener.php which is registered in the Application/config/module.config.php around line 29.


For the second part of this feature I see two possible solutions:

  1. Replace the Paginator service in the service manager config with the Solr enabled Paginator
  2. The CreatePaginator plugin triggers a "fetch paginator" event and if a paginator is returned by a registered listener, it will be used.

The first approach is probably fairly easy to implement, but it's very unflexible.

The second approach is more complicate to implement but allows a lot of flexible afterwards like

In case the second approach is chosen, creating event managers and attaching listeners can be made nearly exclusivly in the configuration files.

Unfortunately, there is only inline documentation available, which describes the way event managers and listener attaching should be done in YAWIK:

Core\Factory\EventManager\EventManagerAbstractFactory

some example configration: Jobs/module.config.php Orders/module.config.php

Getting event managers from the abstract factory: Orders\Factory\Form\JobInvoiceAddressFactory