meilisearch / meilisearch-php

PHP wrapper for the Meilisearch API

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Scout - empty results

francoism90 opened this issue · comments

Description

"require": {
        "laravel/framework": "^9.31",
        "laravel/scout": "^9.4",
        "meilisearch/meilisearch-php": "^0.24.2",
    },
User::search('*')->raw()
=> [
     "hits" => [
       [
         "email" => "bar@foo.com",
         "id" => "bar",
         "__soft_deleted" => 0,
       ],
     ],
     "estimatedTotalHits" => 1,
     "query" => "*",
     "limit" => 20,
     "offset" => 0,
     "processingTimeMs" => 0,
     "nbHits" => 1,
   ]

Expected behavior
Show me the collection/items.

Current behavior

User::search('*')->get()
=> Illuminate\Database\Eloquent\Collection {#5612
     all: [],
   }

Screenshots or Logs
If applicable, add screenshots or logs to help explain your problem.

Environment (please complete the following information):

meilisearch:
        image: 'getmeili/meilisearch:latest'
        ports:
            - '${FORWARD_MEILISEARCH_PORT:-7700}:7700'
        volumes:
            - 'sail-meilisearch:/data.ms'
        networks:
            - sail
        healthcheck:
            test: ["CMD", "wget", "--no-verbose", "--spider",  "http://localhost:7700/health"]
            retries: 3
            timeout: 5s

I'm using Laravel Sail, it worked fine, but it seems to be broken on latest release. :/

Hmm, seems to be related to:
laravel/scout#653
laravel/scout#651

I think it is fixed already @francoism90, feel free to reopen if needed!