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

Correct syntax for "must not" search rule on Laravel Scout Elasticsearch "babenkoivan/scout-elasticsearch-driver" package

I am trying to add a must_not clause to my search using Laravel Scout and babenkoivan/scout-elasticsearch-driver on top of Elasticsearch. The idea is to exclude all results where the sold field either has a timestamp of more than 14 days, or is…
tom f
  • 370
  • 3
  • 16
0
votes
1 answer

Laravel Scout/Algolia: Model relationships not pulling through to index

I have 3 models—Products, Users, and UserProducts. A UserProduct is an instance of a particular product with a User’s specific price, product code etc for that item. Consequently one Product can have many UserProducts, and through those…
Delon
  • 255
  • 3
  • 21
0
votes
1 answer

Laravel Scout Elasticsearch Driver is not updating the search index when a model is created or deleted or updated

I am working on a Laravel project. I am trying to use Elastic search for my project. I am using this package, https://github.com/babenkoivan/scout-elasticsearch-driver?fbclid=IwAR1facl2huPlJI0gA_pUJrvWw4JpEBAtA9lmEbR-Nu9i8-rVx6nQ1FrRTEs#usage. I…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
0
votes
1 answer

Laravel Scout search by model ID

Looking for a solution here that allows searching for a model by it's ID. I am using tntsearch and currently it seems all columns added inside of toSearchableArray() are searchable except for ID. The following is my Order model public function…
connorhansen
  • 171
  • 2
  • 15
0
votes
1 answer

not able to create index aws elasticsearch from laravel application using scout elasticsearch laravel

I am trying to connect from an ec2 instance to AWS Elasticsearch using scout-elasticsearch-laravel but it is failing. my steps :- added host to .env SCOUT_DRIVER=elastic ( I tried elasticsearch also…
Dhaval Chheda
  • 4,637
  • 5
  • 24
  • 44
0
votes
1 answer

laravel elasticsearch just search from first model

I installed the scout and then the Erick Tamayo / laravel-scout-elastic driver. I successfully added The first model with this command php artisan scout: import model and command model :: search ('query') It also worked properly when I added the…
Hamid
  • 57
  • 2
  • 7
0
votes
1 answer

Getting error on php artisan scout:import

I wanted to run php artisan scout:import App\\Product but composer showing [ErrorException] count(): Parameter must be an array or an object that implements Countable In my composer.json I have this "require": { "php": ">=5.6.4", …
0
votes
1 answer

Problem of importing data to elasticsearch in laravel using Oracle

can anyone help me? When I try to import the data to elasticsearch, I get this error below. The database used is Oracle. When I do this: php artisan scout:import "Amp\XIP\LineSearch I receive this error below: Illuminate\Database\QueryException :…
0
votes
1 answer

Laravel/Algolia - `php artisan scout:import "App\item" ` not updating attributes in Algolia

I'm struggling to figure out why this inst working, I've added some columns to my SQL database, and wish to update my algolia index with the changes. I'm running the command in question in the cmd, and it says imported successfully into algolia,…
rargy
  • 109
  • 1
  • 12
0
votes
1 answer

How to persist a file across google app engine deployments in flex environment?

I'm using Google App Engine flex PHP environment to run a Laravel php application. I'm trying to implement Scout search, which has two steps for setup: Index all documents to create a local index file. This is a one time process. Perform search…
0
votes
1 answer

How to also get custom fields of documents from Elasticsearch using Laravel Scout Elasticsearch Driver?

Below is the link to the Scout Elasticsearch Drive which I am using in my Laravel project. https://github.com/babenkoivan/scout-elasticsearch-driver I have database table users with the following columns: id Integer name …
O Connor
  • 4,236
  • 15
  • 50
  • 91
0
votes
1 answer

Can't get the correct results algolia

I can't get scout working properly with algolia. I added the client relationship to the searchable array: public function toSearchableArray() { $this->client; $array = $this->toArray(); $array = $this->transform($array); …
0
votes
1 answer

Search relationship data laravel scout elasticsearch

While using scout elastic search i need to use the same index for a model and their related fields as well. I created the index, but multiple model is not mapped with the same index. Also for same model related fields are not migrated. Eg. My index…
Nitish Jha
  • 23
  • 4
0
votes
1 answer

How to orderby and combine types of the same index in laravel search when using scount with elasticsearch?

I have a Laravel application. I installed elasticsearch server and implemented it to laravel using scout and tamayo/laravel-scout-elastic. All is working almost perfectly. I have two questions that I can't find the answer to. How to order the…
Don40
  • 373
  • 3
  • 17
0
votes
1 answer

Larvel Scout scoped to Logged in user via Auth::user() not working | Issues or technique wrong

Basically I have installed Laravel Scout with TNT Search, all of the configs are correct and they work, I even got a nice search bar to work with an ajax workflow But the results from the models are from the entire database collection where as my…