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
3 answers

Scout Algolia doesn't delete when objectId is not Primary key

When I import my model to Algolia I change the ObjectId to the value of another field. But it seems when I call delete() on my object it doesn't remove it from Algolia. To be more clear here is an example: User{ id, email name } Algolia User…
Hirad Roshandel
  • 2,175
  • 5
  • 40
  • 63
0
votes
2 answers

Class 'App\Order' not found

I'm working with Laravel Scout for the first time, and I use the documentation form here: https://laravel.com/docs/5.4/scout#searching. After following all the steps and adding to my route files Route::get('warbands/search', function (Request…
0
votes
2 answers

Calling searchable() on Query Builder based result throws errors

How to use searcable() method on results returned by query builder? Suppose there are five tables: products vendors categories vendor_products (pivot table for Products and Vendors) product_categories (pivot table for Products and Categories) Is…
hhsadiq
  • 2,871
  • 1
  • 25
  • 39
0
votes
0 answers

laravel scout full text search installation error

while installing the laravel/scout in my laravel 5 app, am getting error. I have run the following command in putty composer require laravel/scout And I got the following error message: php artisan clear-compiled Loading composer repositories…
user3305327
  • 897
  • 4
  • 18
  • 34
0
votes
1 answer

Laravel - elastic search with Laravel Scout package softdelete is not working

I have implemented elasticsearch in laravel 5.5 using "babenkoivan/scout-elasticsearch-driver" package. composer.json "require": { "babenkoivan/scout-elasticsearch-driver": "^2.2", "elasticsearch/elasticsearch": "^5.1", "laravel/scout":…
Dhaval
  • 1,393
  • 5
  • 29
  • 55
0
votes
1 answer

Identify matching key in Laravel Scout

I'm using Laravel Scout with TNTSearch. Is there any way to ascertain which fields (array keys on the toSearchableArray() method) have been matched when a result is returned by the search method?
rhoward
  • 183
  • 2
  • 15
0
votes
2 answers

toSearchableArray() send the same 1 row 7 times to Algolia?

This code retrieves one post from DB but sends it 7 times to Algolia ... There are 7 items in the database 6 records with status = PUBLISHED 1 post with status = DRAFT public function toSearchableArray() { $array = Post::where('status', '=',…
0
votes
1 answer

BadMethodCallException Call to undefined method Illuminate\Database\Query\Builder::searchable()

I am trying to import some existing records to algolia. now using Laravel 5.5 and scout 3.0.0 with algolia-php-sdk. when I execute php artisan scout:import "App\Listings" -v, it throws the following exception [BadMethodCallException] …
Shobi
  • 10,374
  • 6
  • 46
  • 82
0
votes
1 answer

How to test Laravel Scout (with Algolia)?

I have a piece of code like this: public function index(Request $request, Runner $runnerParam) { $name = $request->input('name'); $fromDate = $request->input('from_date'); $toDate = $request->input('to_date'); $runners =…
Gishas
  • 380
  • 6
  • 21
0
votes
1 answer

Laravel Algolia pagination over 1000 results

I am testing Laravel with Algolia. Algolia limits the maximum number of search results to 1000. Which is fine by me, I guess. My problem is that am not quite able to request 1000 search records from Algolia and then paginate. I tried: $result =…
SuperOcean
  • 43
  • 4
0
votes
1 answer

Laravel 5.4, Scout & Algolia model update slow

I'm using Scout + Algolia to search through a table in my Laravel application. The only sticking point I have is when deleting a model. My understanding is that when a model is deleted scout will update algolia and then in turn update my indices.…
jjkilpatrick
  • 45
  • 1
  • 3
0
votes
2 answers

Trigger Laravel Scout update from outside Laravel

I have a Laravel backend which basically works as an API and dashboard for my database and its data. The data updated daily using a Python script directly to the database. Is there any way to trigger a Laravel Scout update (so that the row is…
user4748790
0
votes
0 answers

get number of repetitions of the searched word in elastic index

How can I get number of repetition of the searched word in elastic index? I have a Index with two types that I want to sort on one of my types, and for sort my search result I want to write a script includes sort by a algorithm.. So, for writing…
maral
  • 97
  • 2
  • 11
0
votes
0 answers

Index null values in ElasticSearch

I am indexing my data to ElasticSearch using(laravel-scout), and some fields have null value.. I know Elastic would ignore fields that are empty or null.. so I just need to check existence of that fields. but when I return my search results I see…
maral
  • 97
  • 2
  • 11
0
votes
1 answer

Laravel Scout, Lumen application gives [ErrorException] Missing argument 1 for Illuminate\Support\Manager::createDriver()

When deploying lumen application with Codeship I get an error [ErrorException] Missing argument 1 for Illuminate\Support\Manager::createDriver(), called i n…
Rudy Jessop
  • 872
  • 1
  • 11
  • 23
1 2 3
14
15