Closed Naveedali1234 closed 3 years ago
Ensure that you're doing a php artisan scout:import \App\Models\Product
Then the index would be something like marketplaceproducts
To list all indices, use GET /_cat/indices/
When debugging, I add this code to the performRequest
function in vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php
:
\Illuminate\Support\Facades\Log::debug($endpoint->getMethod());
\Illuminate\Support\Facades\Log::debug($endpoint->getURI());
\Illuminate\Support\Facades\Log::debug(var_export($endpoint->getParams(), true));
\Illuminate\Support\Facades\Log::debug(var_export($endpoint->getBody(), true));
\Illuminate\Support\Facades\Log::debug(var_export($endpoint->getOptions(), true));
Then in one window I do less storage/logs/laravel.log
while in another window I do:
php artisan tinker
\App\Models\Product::search('text');
And then in the logs it shows me exactly what is queried from elasticsearch.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi :)
i have installed this package and i did import my products table records but whenever i search anything then i am getting "index not found exception". below is my configuration of scout.php file
when i did
curl 'localhost:9200/marketplace/_mapping?pretty'
, then i got the following response.Am i missing something in there? any help would be really appreciated.