Questions tagged [laravel-scout]

A Laravel package that provides a simple, driver based solution for adding full-text search to models.

Laravel Scout provides a simple, driver based solution for adding full-text search to Laravel's Eloquent models. Using model observers, Scout will automatically keep your search indexes in sync with your Eloquent records.

Documentation is available at https://laravel.com/docs/5.4/scout

This is not a package which is included in the default installation of Laravel so it needs to be installed independently.

225 questions
1
vote
2 answers

Full text search support in Java and PHP application

My application is build on Java(version 1.8) with framework hibernate 5.2 and PHP(version 7.0) with framework laravel 5.2. I want to apply full text search like Elastic Search, TNTSearch, Laravel Scout. Problem : In database tables insert and…
user7597739
1
vote
2 answers

Laravel Scout production error with TNTSearch driver

Searching using the TNTSearch driver works in a Homestead environment however on production it returns error: the below error, Symfony\Component\Debug\Exception\FatalThrowableError: Class 'AlgoliaSearch\Version' not found on …
m33bo
  • 1,334
  • 1
  • 17
  • 34
1
vote
1 answer

Adding input query to route value for search function Laravel Scout

Trying to set up basic search functionality for products. I am having trouble sorting the route parameter variable and passing the query string to the search function. Route::get('/search/{query?}', 'ProductController@searchable'); This works and…
m33bo
  • 1,334
  • 1
  • 17
  • 34
1
vote
0 answers

Search query does not written array object

I am working in Laravel 5.4. I have written a search query and it works fine. But it does not return array object. It return like below data: "user" : { 2: { "id":2, "firstname":"xyz" }, 3: { "id":31, …
Nisarg Bhavsar
  • 946
  • 2
  • 18
  • 40
1
vote
1 answer

Scout import and algolia index

So basically I deployed my app to production, and I'm having an issue with Scout not importing the records. in a component I have: var algoliasearch = require('algoliasearch'); var client = algoliasearch('ID', 'KEY'); var = index =…
user3813360
  • 566
  • 9
  • 25
1
vote
1 answer

No searching on primary key with Laravel Scout?

I'm using Laravel Scout with TNTSearch Engine at it's working fine but with one little problem. I have the following records. | ID | Name | +---------+----------+ | 9030100 | Car | | 9030150 | Car2 | | 9030200 | Radio | Here…
Damian
  • 525
  • 2
  • 11
  • 24
1
vote
3 answers

Executing Artisan command with arguments

Currently i'm facing following problem: I want to update my search index automatically after my database has been updated. I've registered a saved() listener on my tables in AppServiceProvider: \App\Customer::saved(function(\App\Customer $customer)…
steschwa
  • 95
  • 3
  • 8
0
votes
0 answers

How to skip database queries when calling `search` on laravel model with meili and laravel scout

I have a transaction model, and other related models. While indexing in meili I eager load relations in transaction model and add a new key and relation, so in meili it shows a key and JSON data. I thought calling ::search on model will fetch data…
shyammakwana.me
  • 5,562
  • 2
  • 29
  • 50
0
votes
0 answers

Laravel Scout + TNTSearch: Undefined array key "id" / SQLSTATE[42S22]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid column name 'id'

This is my first time using Laravel Scout for searching. I have gone up to the step where I need to import the Model into the Indexer. However, I am facing error and have searched of similar cases like mine but only to finally come here in…
0
votes
0 answers

Unable to upgrade to Laravel v10 algolia/scout-extended 2.0 illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3

I am trying to upgrade from Laravel 9 ---> 10. I went through their upgrade guide, but when I try to run composer update I get an error message: Your requirements could not be resolved to an installable set of packages. Problem 1 -…
Casey
  • 536
  • 2
  • 14
  • 28
0
votes
0 answers

Scout is not able to find my Model in Laravel (9.45.1)

I had my model name different from table name - "CompanyUser" against "company_users". I was unable to index this particular Model. I am constantly getting the below message whenever I run the 'php artisan scout:import "App\Models\CompanyUser"' $…
0
votes
1 answer

makeAllSearchableUsing doesn't work to eagerload relation with elasticsearch

I have the following code in my Laravel model: public function toSearchableArray() { return [ 'name' => $this->name, 'description' => $this->description, ]; } public function mappableAs(): array { return [ 'name'…
0
votes
1 answer

Laravel Scout with AWS OpenSearch illegal_argument_exception when searching on model

I have installed the zingimmick/laravel-scout-opensearch driver for Scout on my Laravel 10 application and manually synced a few records. I was not able to use the php artisan scout:import command because my table does not have an auto-incrementing…
Latheesan
  • 23,247
  • 32
  • 107
  • 201
0
votes
0 answers

Laravel Scout using Meilisearch: How to set attributesToHighlight with paginate?

How can I use attributesToHighlight Meilisearch feature with Laravel Scout? I am able to get results in _formatted attribute when I do: Page::search($search, function ($meilisearch, string $query, array $options) { …
MAMProgr
  • 400
  • 5
  • 12
0
votes
1 answer

laravel scout and meilisearch filter and sort desc between two created_at filed date

i want to filter some data between two date in created_at column and sort all by created_at i don't have timestamp My Code $startDate = Carbon::parse('2022-02-01')->startOfDay(); $endDate = Carbon::parse('2022-02-15')->endOfDay(); $messages =…