doctrine / search

Generic Search extension for indexing and querying ODM/ORM objects with different text-search engine implementations
http://www.doctrine-project.org
MIT License
273 stars 52 forks source link

Support for UnitOfWork, EntityRepository, EventManager and standalone deserialization features #82

Closed MrHash closed 10 years ago

MrHash commented 11 years ago

Refactoring of SearchManager into UnitOfWork style paradigm.

Now includes support for EventManager registered listeners (no lifecycle callbacks yet).

Added entity respository support for easy find/findOneBy support.

// Search by ID
$entity = $searchManager->getRepository('Entities\Post')->find($id);
// Search by Term
$entity = $searchManager->getRepository('Entities\Post')->findOneBy(array($key => $term));

Deserialization and hydration in this case when not using the SearchManager::#createQuery method is handled by the registered SerializerInterface.

Further abstraction of the SearchClientInterface returned result documents is required to support documents returned by other client adapters such as Solarium. Also currently limited support for collections of documents.

Backwards comaptibility is maintained with the exception of the required addition of the EventManager to the SearchManager constructor.

MrHash commented 10 years ago

Merged into fork master. Let me know if these updates are of interest in future.