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

Laravel scout check if relation is not empty?

namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use Laravel\Scout\Searchable; class Event extends Model { protected $table = 'events'; public $timestamps = true; use Searchable; …
Przemek Wojtas
  • 1,311
  • 5
  • 26
  • 51
0
votes
0 answers

Laravel Scout TNTSearch driver does not import all the data

I'm trying to implement search functionality through Laravel Scout using the TNTSearch driver. Overall functionality is working but import does not index all the records in the table. For example, my table has 21 records but it just indexes around 5…
Sanjay Sharma
  • 151
  • 1
  • 6
0
votes
2 answers

Limit and offset in laravel scout

I am using scout for my api so can't use pagination , where as the scout only provides the pagination only so are there any ways to use offset and limit in laravel scout?
ujwal dhakal
  • 2,289
  • 2
  • 30
  • 50
0
votes
0 answers

Use another apps search index with Laravel Scout?

I have two different apps with two separate Laravel installs. The 1st one has some models, and its data is indexed with Scout (using the TNT search driver, which created index files on disk, if it's relevant). Now I would like to use the 1st's…
Jean-Philippe Murray
  • 1,208
  • 2
  • 12
  • 34
0
votes
1 answer

Issues with Laravel Scout using TNTSearch driver

I'm getting the error message: 'Driver [tntsearch] not supported' With Laravel Scout when I issue the Artisan command php artisan scout:import "App\Location" php artisan -V => Laravel Framework 5.4.16 Is anyone else seeing this error?
cawhite78
  • 91
  • 5
0
votes
1 answer

Laravel Scout with TNTSearch driver filtering where clause

I try to get the result of search queries with a where clause in the query using TNTSearch, but it doesn't work. The query didn't get the where clause. Controller
Mathieu Mourareau
  • 1,140
  • 2
  • 23
  • 47
0
votes
1 answer

Laravel Scout not finding any records

I am using A Search Bar Form which searches in a database of +-175.000 Models. I've installed Scout accordingly to the documentation and imported all the records using scout:import. Now, I've setup a function in my Controller to do the search and…
xTheWolf
  • 1,756
  • 4
  • 18
  • 43
0
votes
1 answer

Laravel Scout with AWS ElasticSearch added Basic Auth Header

So I am using Laravel Scout in a 5.3 app to connect to AWS ElasticSearch. Everything is connected except when I try to connect to ElasticSearch an extra Basic Auth header is being added even though I am specifying an IAM credentials. Specifically,…
0
votes
1 answer

Laravel Scout Where Clause Not Working As Expected

I am implementing full-text search with Laravel Scout and TNTSearch. Everything is working fine aside for the fact that my where clause is not effective in the search results. return \App\Models\Ad::search('macbook')->where('school_id',…
ammezie
  • 355
  • 5
  • 20
-1
votes
1 answer

Advanced Laravel Search Functionality Using Scout

I have a Model named Profile in my project and i want to search user's full name through the records using Laravel Scout. Search Function public function SearchUser(Request $request) { $searchProfileQuery =…
-1
votes
1 answer

Assigning values ​from an input through database lookup

First of all, this is a function where I register a client, however, if he is married, I must put the identification of the spouse and with this filling, the function must display the name of the spouse for the user to be sure what he is…
-1
votes
1 answer

Unable to use Searchable in laravel model

I am trying to use Laravel Scout Searchable into my model but it gives me an error Undefined type 'Laravel\Scout\Searchable'. I have already included use Laravel\Scout\Searchable; in the code. Could someone please tell me what am I doing wrong…
-1
votes
1 answer

php artisan scout:import throws error with Authenticate.php

I'm using Laravel 7.x and want to create a new search index for Algolia (with Laravel Scout). As I've come to learn I can achieve this with the command "php artisan scout:import". Laravel Scout as well as Passport are installed and I remember this…
Dominic
  • 440
  • 8
  • 22
-1
votes
2 answers

Laravel Scout - The relationship is not added at creation

PHP: 7.3 Laravel: 5.8 Laravel Scout: 7.1 Algolia Scout extended: 1.6 class Page extends Model { use Searchable; public function toSearchableArray() { $array = [ 'title' => optional($this->content)->title, 'extra' =>…
Dorin Niscu
  • 721
  • 1
  • 9
  • 26
-1
votes
1 answer

Laravel Scout & Algolia - can't create index on staging server after migrating from TNTSearch to Algolia

this is very weird. I've successfully created an index on my local server and it showed up in Algolia dashbord. However, when I ran php artisan scout:import 'App\MyModel' on my staging server I get: Imported [App\MyModel] models up to ID: 22 All…
dbr
  • 1,037
  • 14
  • 34
1 2 3
14
15