Skip to content

empty result meilisearch #2541

Closed
Closed
@ithuis

Description

@ithuis

i get empty result in my meilisearch results. The raw results work fine.

i found that the error is in the
class "Laravel\Scout\Searchable"
function "queryScoutModelsByIds"

where it says
$this->qualifyColumn($this->getScoutKeyName()), $ids

the "qualifyColumn" returns for example 'users'.'_id'. This will not work in a query using this module.

i dont know enough about mongodb to understand the impact of my proposal.
But it seems that adding a function like

/** * Qualify the given column name by the model's table. * * @param string $column * @return string */ public function qualifyColumn($column) { return $column; }

to the Jenssegers\Mongodb\Eloquent\Model class would fix it

( for now i added the function to my user model.)

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