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
0
votes
1 answer

Search in parent relationship with the database driver

Let's say you have this relationship: users x cats. Each user can have many cats (a "one-to-many" relationship): class Cat extends Model { public function user() { return $this->belongsTo(User::class); } } Both models (users…
Daniel Loureiro
  • 4,595
  • 34
  • 48
0
votes
2 answers

How can I make a casted array searchable with Laravel Scout and TNTSearch?

I'm currently working on a blog in Laravel 8. The Article model is made like this: protected $fillable = [ 'title', 'subtitle', 'body', 'category', 'view_count', 'published_at', 'tags' …
rx4storm
  • 1
  • 1
0
votes
1 answer

laravel scout add additional attribute (only in meilisearch)

I try to migrate a SQL based search to meilisearch using laravel scout. At the moment the whole search should be migrated to meilisearch, including all filter and sorting options. A product has a relation to feedbacks (product model): //returns all…
gamedev
  • 45
  • 1
  • 6
0
votes
1 answer

Scout Laravel Algolia search too queries

I'm using Laravel scout with Algolia search. I have this eloquent relation: public function doctors() { return $this->belongsTo(Doctor::class, 'doctor_id'); } Here I get results by Algolia search: $doctors = DoctorInfo::search($this->search) …
cloude
  • 338
  • 5
  • 18
0
votes
0 answers

Collection engine for Production

I am currently using Meilisearch with Scout and I came across this part where the Laravel Documentation says for Local development we could use collection method. I am wondering what would be the outcome if i have collection method for production…
0
votes
1 answer

Connection refused while using Laravel Scout

I'm trying to install Laravel Scout into my project. I've follow the documentation : I've done the composer require laravel/scout Then php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider" And then composer require…
IsmaElzem
  • 109
  • 10
0
votes
1 answer

Error on running scout:import command. Internal error: panic

I am using laravel scout with meilisearch driver. The problem is: When I run the command php artisan scout:import "App\Models\Article" the below error is shown: I am using laravel 8. MeiliSearch\Exceptions\ApiException Internal error: panic at…
farhad.a
  • 341
  • 4
  • 17
0
votes
1 answer

Problem with dynamic filtering using Algolia Facet Filters

We faced a problem when we were developing the search part of our E-Commerce website with dynamic filters using facet filters. We are getting the list of our facet filters by sending ["facets":"*"] as a parameter. For example, we have a filter for…
0
votes
2 answers

Laravel Scout - pagination eager loading

How do I eager load with Laravel Scout? Here is my query: $results = Submission::search($query, function ($meilisearch, $query, $options) use ($request) { $resultsFilter = ''; if ($subchan = $request->input('subchan')) { …
Felix
  • 2,532
  • 5
  • 37
  • 75
0
votes
0 answers

Importing into meilisearch from mongodb using laravel scout takes too long

I have around 6 million rows in my mongodb collection and importing into meilisearch using php artisan scout:import 'model' takes forever to finish. Importing data with limit option php artisan scout:import 'model' -c 10000 gives me the following…
0
votes
1 answer

Update Laravel Scout (Algolia) without database

I'm fetching data from Airtable and converting this to an Eloquent Model. Is there a way to send this Model to Algolia without first storing it in a MySql DB?
Mike Thrussell
  • 4,175
  • 8
  • 43
  • 59
0
votes
1 answer

Meilisearch user specific filtering

I have three tables like users, articles and user_article. The users table is self-explanatory. In articles i have a lots of entries, e.g. 20k. In user_article i have entries which article a user has. If a user goes to the search page he should have…
Loko
  • 185
  • 3
  • 12
0
votes
3 answers

Laravel Scout/Meilisearch - filter by a non-searchable column

I want to make it so that I can filter results based on a column that isn't searchable with Meilisearch and Laravel scout. So imagine a "Comment" table, with the following searchable columns: public function toSearchableArray() { $array =…
Felix
  • 2,532
  • 5
  • 37
  • 75
0
votes
2 answers

Laravel Scout - Where not equal to

I'm building a query for Laravel Scout. $subchanResults = Subchan::search($query) ->when($request->input('incl_nsfw'), function ($query, $incl_nsfw) { if ($incl_nsfw == 0) { return $query->where('nsfw','!=', 'always'); …
Felix
  • 2,532
  • 5
  • 37
  • 75
0
votes
1 answer

Why can't I bind Elasticsearch and Laravel Scout?

I decided to test Elasticsearch in conjunction with Laravel Scout. I took this article as a basis Attempt #1 composer require elasticsearch/elasticsearch - installing ES for Laravel composer require laravel/scout - installing latest version for…