Skip to content

Add raw search? #17

Closed
Closed
@arkste

Description

@arkste

Looking at MeiliSearchService->search() it requires an ObjectManager.

While i do get the idea behind it, there should be a way to call the raw results without getting the entities from the database, something like this:

    public function searchRaw(
        string $className,
        string $query = '',
        array $requestOptions = []
    ): array {
        $this->assertIsSearchable($className);

        return $this->engine->search($query, $this->searchableAs($className), $requestOptions);
    }

Performance-wise its faster getting the data directly from MS than waiting for the "real" entities from MySQL.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions