Skip to content

Add a configuration setting on indices to choose a custom repository method to use in "meilisearch:import" command #344

Open
@remigarcia

Description

@remigarcia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions