Description
Description
The Meilisearch\Bundle\Command\MeilisearchImportCommand
command (meilisearch:import
) uses the findBy
method by default on the repository of the entities to index. There is no possibility to pass parameters to this command to filter entities prior to querying them in Doctrine.
Basic example
In my specific case, I have hundreds of thousands entities in my database, but only 5% of them should be indexed.
A full indexation with meilisearch:import
command is very long in my case, as it gets all the unfiltered entites, and checks the index_if
method on each to know if it needs to be indexed or not.
When I fill a new index with my data, I want to use a custom method in the entity repository to retrieve only the entities that will need to be indexed.