Scout Extended: The Full Power of Algolia in Laravel

Overview

Scout Extended

CircleCI Quality Score Coverage Total Downloads Latest Version License

DocumentationCommunity ForumStack OverflowReport a bugFAQSupport

To dig right in, visit the Scout Extended documentation.

Scout Extended provides the perfect starting point to integrate Algolia into your Laravel application. It is carefully crafted to simplify the usage of Algolia within the Laravel Framework.

It’s built on top of the latest release of Laravel Scout, the official Laravel search package. Using Scout Extended, you are free to take advantage of all of Laravel Scout’s great features, and at the same time leverage the complete set of Algolia’s search experience.

Features

💡 Documentation

For full documentation, visit the Scout Extended documentation.

Note: This package adds functionalities to Laravel Scout, and for this reason, we encourage you to read the Scout documentation first. Documentation for Scout can be found on the Laravel website.

Because everyone should be able to build great search, you can use Algolia's basic Community Plan. It's free up to a certain number of records and operations.

Troubleshooting

Encountering an issue? Before reaching out to support, we recommend heading to our FAQ where you will find answers for the most common issues and gotchas with the package.

Use the Dockerfile

If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our dedicated guide to learn more.

🆓 License

Scout Extended is an open-sourced software licensed under the MIT license.

Comments
  • cURL error 28: Resolving timed out after 2000 milliseconds

    cURL error 28: Resolving timed out after 2000 milliseconds

    • Laravel version: ^8.0
    • Algolia Scout Extended version: ^1.10
    • Algolia Client Version: ^2.7

    Description

    I'm having this error.. it seems something about network, but i tried from different servers, locations, etc.. and i cant figure out whats going on..

    it happens always when i run scout:reimport directly on terminal or through laravel scheduler. The problem increases because most of the time it deletes the index and we run out of articles...

    production.ERROR: cURL error 28: Resolving timed out after 2000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://hjk5el3fft-dsn.algolia.net/1/indexes/catalog/settings?getVersion=2 {"exception":"[object] (GuzzleHttp\Exception\ConnectException(code: 0): cURL error 28: Resolving timed out after 2000 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://hjk5el3fft-dsn.algolia.net/1/indexes/catalog/settings?getVersion=2 at .../vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210)"} [

    Steps To Reproduce

    scout:reimport directly on terminal or through laravel scheduler.

    opened by sal1ner0 27
  • Index configuration file per environment

    Index configuration file per environment

    Let's assume we have an articles index and on our local machine we've set SCOUT_PREFIX=dev_. This is to prevent screwing up the indexes for our production environment. On production, we might have set the prefix to prod_ or aren't using a prefix at all.

    So to add our index configuration to version control we run php artisan scout:optimize and a scout-dev-articles.php configuration file will be generated.

    However, this will not work for our production environment, which will effectively require a scout-prod-articles.php configuration file.

    In response to: https://twitter.com/enunomaduro/status/1088459313964699655

    enhancement 
    opened by bhulsman 25
  • where() method not filtering query

    where() method not filtering query

    I'm trying to integrate algolia in a personal project. The table I'm indexing is the patterns table that has the user_id as FK and is included as one of the fileds I upload to algolia.

    class SearchController extends Controller
    {
        public function show()
        {
            $search = request('q');
            $patterns = Pattern::search($search)->where('user_id', '=', Auth::user()->id)->get();
            // dd(Auth::user()->id);
            return view('search.index', ['patterns' => $patterns]);
        }
    }
    

    If I dump the user_id I get 1. Intentionally I'm searching for something that doesn't belong to that user expecting to get nothing from algoia but I still get the record back. The record that I get back has the user_id 3.

    I'm not sure if I'm missing some setting in the algolia dashboard or the code is missing something.

    I'm searching for the word test and is the only record that contains that word.

    screen shot 2019-01-06 at 9 57 01 am support 
    opened by redeemefy 23
  • Aggregators broken since laravel/scout was updated to `v9.1.0` when deleting Models became queueable

    Aggregators broken since laravel/scout was updated to `v9.1.0` when deleting Models became queueable

    After a few hours of investigation, we finally figured out that this PR over at laravel/scout, broke our production setup when trying to remove Models from Algolia using an Aggregator.

    The following exception is thrown...

    [Algolia\ScoutExtended\Exceptions\ModelNotDefinedInAggregatorException] Model not defined in aggregator.
    

    Here's the stack trace...

    #0 /home/vendor/algolia/scout-extended/src/Searchable/ObjectIdEncrypter.php(42): Algolia\ScoutExtended\Searchable\Aggregator->getScoutKey()
    #1 /home/vendor/algolia/scout-extended/src/Jobs/DeleteJob.php(58): Algolia\ScoutExtended\Searchable\ObjectIdEncrypter::encrypt(Object(App\Search\KeywordSearch))
    #2 [internal function]: Algolia\ScoutExtended\Jobs\DeleteJob->Algolia\ScoutExtended\Jobs\{closure}(Object(App\Search\KeywordSearch), 0)
    #3 /home/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(642): array_map(Object(Closure), Array, Array)
    #4 /home/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Collection.php(348): Illuminate\Support\Collection->map(Object(Closure))
    #5 /home/vendor/algolia/scout-extended/src/Jobs/DeleteJob.php(59): Illuminate\Database\Eloquent\Collection->map(Object(Closure))
    #6 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Algolia\ScoutExtended\Jobs\DeleteJob->handle(Object(Algolia\AlgoliaSearch\SearchClient))
    #7 /home/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    #8 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
    #9 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
    #10 /home/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
    #11 /home/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)
    #12 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Algolia\ScoutExtended\Jobs\DeleteJob))
    #13 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Algolia\ScoutExtended\Jobs\DeleteJob))
    #14 /home/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
    #15 /home/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(421): Illuminate\Bus\Dispatcher->dispatchNow(Object(Algolia\ScoutExtended\Jobs\DeleteJob), false)
    #16 /home/vendor/algolia/scout-extended/src/Engines/AlgoliaEngine.php(78): dispatch_now(Object(Algolia\ScoutExtended\Jobs\DeleteJob))
    #17 /home/vendor/laravel/scout/src/Jobs/RemoveFromSearch.php(41): Algolia\ScoutExtended\Engines\AlgoliaEngine->delete(Object(Illuminate\Database\Eloquent\Collection))
    #18 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Scout\Jobs\RemoveFromSearch->handle()
    #19 /home/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    #20 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
    #21 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
    #22 /home/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
    #23 /home/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array)
    #24 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Laravel\Scout\Jobs\RemoveFromSearch))
    #25 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Laravel\Scout\Jobs\RemoveFromSearch))
    #26 /home/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure))
    #27 /home/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(120): Illuminate\Bus\Dispatcher->dispatchNow(Object(Laravel\Scout\Jobs\RemoveFromSearch), false)
    #28 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Laravel\Scout\Jobs\RemoveFromSearch))
    #29 /home/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Laravel\Scout\Jobs\RemoveFromSearch))
    #30 /home/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure))
    #31 /home/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\RedisJob), Object(Laravel\Scout\Jobs\RemoveFromSearch))
    #32 /home/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\RedisJob), Array)
    #33 /home/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(428): Illuminate\Queue\Jobs\Job->fire()
    #34 /home/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(378): Illuminate\Queue\Worker->process('redis', Object(Illuminate\Queue\Jobs\RedisJob), Object(Illuminate\Queue\WorkerOptions))
    #35 /home/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(172): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\RedisJob), 'redis', Object(Illuminate\Queue\WorkerOptions))
    #36 /home/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(117): Illuminate\Queue\Worker->daemon('redis', 'redis-low', Object(Illuminate\Queue\WorkerOptions))
    #37 /home/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(101): Illuminate\Queue\Console\WorkCommand->runWorker('redis', 'redis-low')
    #38 /home/vendor/laravel/horizon/src/Console/WorkCommand.php(51): Illuminate\Queue\Console\WorkCommand->handle()
    #39 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Laravel\Horizon\Console\WorkCommand->handle()
    #40 /home/vendor/laravel/framework/src/Illuminate/Container/Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
    #41 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
    #42 /home/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
    #43 /home/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
    #44 /home/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call(Array)
    #45 /home/vendor/symfony/console/Command/Command.php(288): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    #46 /home/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
    #47 /home/vendor/symfony/console/Application.php(974): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #48 /home/vendor/symfony/console/Application.php(291): Symfony\Component\Console\Application->doRunCommand(Object(Laravel\Horizon\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #49 /home/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #50 /home/vendor/laravel/framework/src/Illuminate/Console/Application.php(92): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #51 /home/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #52 /home/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #53 {main}
    

    If you need any more information to figure this out, let me know.

    Thanks

    bug 
    opened by GC-Mark 16
  • PHP 8.0 Support

    PHP 8.0 Support

    | Q | A | ----------------- | ---------- | Bug fix? | no | New feature? | yes | BC breaks? | no
    | Related Issue | / | Need Doc update | no

    Describe your change

    Provide support on PHP 8.0. I'll keep this PR in Draft until all dependencies can handle PHP 8.0

    Waiting for:

    • [x] migration Travis to Circle CI
    • [x] algolia/algoliasearch-client-php (https://github.com/algolia/algoliasearch-client-php/pull/644)
    • [x] laravel/scout (https://github.com/laravel/scout/pull/425)
    opened by Nielsvanpach 14
  • Aggregates unable to rehyrdate models if scout key is set

    Aggregates unable to rehyrdate models if scout key is set

    I've not fully investigated the source of this yet, but it appears that if the scoutKey() feature is used, aggregates can't rehydrate themselves correctly. Mostly leaving this here as a reminder to come back to it.

    bug 
    opened by jimbojsb 14
  • Prevent Aggregates that use the same Models from registering multiple observers

    Prevent Aggregates that use the same Models from registering multiple observers

    Take the following aggregates as an example

    <?php
    
    namespace App\Search;
    
    use Algolia\ScoutExtended\Searchable\Aggregator;
    use App\Models\Base\OpportunityType;
    
    class KeywordSearch extends Aggregator
    {
        /**
         * The names of the models that should be aggregated.
         *
         * @var string[]
         */
        protected $models = [
            \App\Models\Base\Employer::class,
            \App\Models\Base\Opportunity::class,
            \App\Models\Base\University::class,
        ];
    }
    
    <?php
    
    namespace App\Search;
    
    use Algolia\ScoutExtended\Searchable\Aggregator;
    use App\Models\Base\OpportunityType;
    
    class InternalSearch extends Aggregator
    {
        /**
         * The names of the models that should be aggregated.
         *
         * @var string[]
         */
        protected $models = [
            \App\Models\Base\Employer::class,
            \App\Models\Base\Opportunity::class,
        ];
    }
    

    As you can see, both these aggregators use the Employer Model and the Opportunity Model (I have removed some custom toSearchableArray code for brevity).

    Now, in the service provider, you would obviously boot these aggregators as follows...

    \App\Search\KeywordSearch::bootSearchable();
    \App\Search\InternalSearch::bootSearchable();
    

    Now, this seems to work as expected, but the problem is, that when we boot the aggregators, what happens is that the Employer Model and the Opportunity Model each get 2 observers registered on them which results in twice as many jobs being sent to the queue when either of those Models is updated.

    This PR introduces a new way of registering multiple aggregators with one method call

    Aggregators::bootSearchables([
         \App\Search\KeywordSearch::class,
         \App\Search\InternalSearch::class,
    ]);
    

    The new Aggregator class exposes a new bootSearchables() method which ensures that for all Models that are referenced across the specified aggregators, we only register one observer for each Model, and this single observer deals with triggering all the aggregators related to that specific Model.

    This will need tests but wanted some feedback first as the test suite looks a bit tricky to get your head into.

    opened by JayBizzle 13
  • Importing certain strings causes json_encode error

    Importing certain strings causes json_encode error

    Version in question: v1.8.0

    To reproduce:

    1. Setup algolia search client and scout extended.
    2. Prepare table with VARCHAR column.
    3. Insert a row with text. In my case, I used this "0281E3986958"
    4. Run artisan scout:import or artisan scout:reimport

    Observed behavior: An error occurs InvalidArgumentException : json_encode error: Inf and NaN cannot be JSON encoded

    Expected behavior: Should import fine.

    Findings: This was caused by "0281E3986958" data that is treated as an exponential number and was converted into INF (["column" => INF]). Line that is causing this is L116 Tried replacing ->transform($array) with ->toArray() and it imported fine.

    opened by balgf 12
  • Support  of more complex Where is search queries

    Support of more complex Where is search queries

    Currently Scout allows you to add simple "where" clauses to your search queries, as commented in the documentation:

    https://laravel.com/docs/5.7/scout#where-clauses

    It would be great if we could add more complex Where clauses in an easy way, such as:

    $orders = App\Order::search('Star Trek')->where('user_id', '!=','1')->get();

    enhancement 
    opened by techguydev 12
  • Add method to delete remote index

    Add method to delete remote index

    Hello Algolia Team,

    Overview Currently there is a static method for making all Aggregated Models Searchable, but there isn't a method for making them all unsearchable.

    Use Case For unit tests with the Algolia scout driver, we create dummy records that are searchable. At the end of the test, we make the Model unsearchable. Unless there is a way, we are unable to make Aggregator unsearchable through a static method.

    i.e. Aggregator:: makeAllUnsearchable(); or Aggregator::unsearchable();

    Thank you!

    enhancement 
    opened by relocity-rd 11
  • Undefined offset: 1 scout-extended with extended & Record too big

    Undefined offset: 1 scout-extended with extended & Record too big

    I keep getting an undefined offset: 1 with scout extended at this line: https://github.com/algolia/scout-extended/blob/master/src/Searchable/ObjectIdEncrypter.php#L77

    Maybe due to Algolia search client incompatibility if you see here: https://github.com/laravel/scout/issues/328

    support 
    opened by icemancast 11
  • Add replica indices to the secured api search key

    Add replica indices to the secured api search key

    The api key generated via Algolia::searchKey is too restrictive, it only includes the primary index in its restrictIndices array. When using replicas for sorting with that key it fails, because the replicas are not included. This happens when sending the (secured) search key to a frontend javascript that only has one api key.

    This change loads the replicas setting from the associated index config file and appends that to the restrictIndices.

    There is probably a better way to load the config, I didn't dive that deep in the code. Perhaps it should be loaded from the remote index instead of via the local synced config file?

    opened by JanMisker 0
  • Support for whereNotIn?

    Support for whereNotIn?

    Description

    Hello there! I think that the implementation of the whereNotIn method is very helpful,

    User::search($search)->whereNotIn('id', [1, 2, 3]);
    

    Let’s think that we need to search for a User, but filter them by $except & $only.

    If we want to apply only the except filter, we can perform two queries to get the results

    User::search($search)
        ->when($except, function (Builder $query) use ($except, $only) {
            $ids = User::whereNotIn('id', $except)->pluck('id')->toArray();
            
            $query->whereIn('id', $ids);
        })
        ->take(5)
        ->get();
    

    But the things get harder when we want to combine the $except and the $only

    User::search($search)
        ->when($except || $only, function (Builder $query) use ($except, $only) {
            $except = !$only && $except ?
                User::whereNotIn('id', $except)->pluck('id')->toArray() :
                $except ?? [];
            
            $values = is_array($only) ? array_diff($only, $except) : $except;
            
            $query->whereIn('id', $values);
        })
        ->take(5)
        ->get();
    

    With the whereNotIn, we can combine both

    User::search($search)
        ->when($except, fn (Builder $query) => $query->whereNotIn('id', $except))
        ->when($only, fn (Builder $query) => $query->whereIn('id', $only))
        ->take(5)
        ->get();
    
    opened by JoaoPedroDiasMonteiro 0
  • deleteBy throwing Algolia's limit rate on bulk delete

    deleteBy throwing Algolia's limit rate on bulk delete

    • Laravel version: 8.83.0
    • Algolia Scout Extended version: 2.0.1
    • Language Version: 7.4

    Description

    Hi. We're working on a marketplace application, that currently has over 200k users and +300k products. We're experiencing the following issue while running a cron job that checks and deletes (or not) Searchable objects from our database:

    Algolia\AlgoliaSearch\Exceptions\BadRequestException^ {#4246
      -request: null
      #message: "Rate limit reached for expensive delete-by-query job count (observed: 1; allowed: 1). To learn more about these limits, please see https://support.algolia.com/hc/en-us/articles/4406975251089-Is-there-a-rate-limit-."
      #code: 429
      #file: "./vendor/algolia/algoliasearch-client-php/src/RetryStrategy/ApiWrapper.php"
    }
    

    It seems to be that the problem occurs in src/Jobs/DeleteJob.php, since it does use deleteBy at line 55. After doing a little research at Algolia's limit rate error, we found that it could be solved by using deleteObject instead of deleteBy.

    We were able to make it work by using the following code at DeleteJob's handle method:

        public function handle(SearchClient $client): void
        {
            if ($this->searchables->isEmpty()) {
                return;
            }
    
            $index = $client->initIndex($this->searchables->first()->searchableAs());
    
            $searchable = $this->searchables->map(function ($searchable) {
                return ObjectIdEncrypter::encrypt($searchable);
            })->toArray();
    
            $objectId = explode('::', $searchable[0])[1];
            $result = $index->deleteObject($objectId);
    
            if (config('scout.synchronous', false)) {
                $result->wait();
            }
        }
    

    Please, let us know what you think about this or if you have ever heard before about Algolia's limit rate policy and how you managed it.

    Thanks in advance, Regards.

    Steps To Reproduce

    opened by eze2411 2
  • Please run `./vendor/bin/pest` instead of `/vendor/bin/phpunit`.

    Please run `./vendor/bin/pest` instead of `/vendor/bin/phpunit`.

    • Laravel version: 9.19.0
    • Algolia Scout Extended version:
    • Algolia Client Version: #.#.#
    • Language Version: 8.1

    Description

    When I Run

    php artisan scout:sync

    Please run ./vendor/bin/pest instead of /vendor/bin/phpunit.

    Steps To Reproduce

    opened by andresilvagomez 3
  • Algolia does not work behind a proxy

    Algolia does not work behind a proxy

    • Laravel version: 8.83.0
    • Algolia Scout Extended version: 2.0.1
    • Language Version: PHP 7.4.12

    Hello,

    Algolia (with Scout Extended package) does not work behind a proxy, I saw this documentation: https://www.algolia.com/doc/api-client/advanced/pass-options-to-the-http-client/php/?client=php but I couldn't find how to set up the proxy with Scout Extended.

    Could you tell me how to proceed?

    Thank you.

    Best regards

    Gaëlle

    opened by gaelle-cari 1
  • Changed AggregatorObserver delete & forceDelete Methods to respect Aggregator syncing status

    Changed AggregatorObserver delete & forceDelete Methods to respect Aggregator syncing status

    | Q | A | ----------------- | ---------- | Bug fix? | yes | New feature? | no | BC breaks? | no, I don't think so
    | Related Issue | Fix #285 | Need Doc update | no

    Describe your change

    This PR changes the AggregatorObserver delete and forceDelete methods to check syncingDisabledFor using the Aggregator class rather than the Model class. This brings these methods inline with the behaviour of the saved method.

    It also updates the delete method to reflect changes made in the parent ModelObserver class.

    What problem is this fixing?

    If you want to use an aggregator but don't want to index individually the models being aggregated, the algolia/scout-extended docs recommend to simply disable syncing for those models, eg...

    Laravel\Scout\ModelObserver::disableSyncingFor(Article::class); Laravel\Scout\ModelObserver::disableSyncingFor(Event::class);

    However, the AggregatorObserver delete and forceDelete methods were both checking syncingDisabledFor using the Model class rather than the Aggregator class. This meant that if you deleted a model which had syncing disabled (because you only wanted an Aggregated Index and not individual indexes), it was not deleted from the aggregated index.

    Conversely, the saved method does check syncingDisabledFor with the Aggregator class, which I believe should be the correct behaviour.

    opened by goldmerc 0
Releases(v2.1.0)
Owner
Algolia
Open source tools for building search. Learn more at community.algolia.com
Algolia
This Laravel package allows for batching of Scout updates.

Laravel Scout Batch Searchable This Laravel package allows for batching of Scout updates. Requirements Laravel Scout 9+ Scheduler with cron Descriptio

Optimist Digital 14 Oct 26, 2022
Driver for Laravel Scout search package based on tntsearch

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch

TNT Studio 1k Dec 27, 2022
This package provides extended support for our spatie/enum package in Laravel.

Laravel support for spatie/enum This package provides extended support for our spatie/enum package in Laravel. Installation You can install the packag

Spatie 264 Dec 23, 2022
An extended laravel eloquent WHERE method to work with sql LIKE operator.

Laravel Eloquent WhereLike An extended laravel eloquent WHERE method to work with sql LIKE operator. Inspiration The idea of this package comes from o

Touhidur Rahman 33 Aug 6, 2022
A collection of classes to be extended/used in laravel apps for quick development

laraquick A collection of classes to be extended/used in laravel applications for quick development. Introduction The library contains traits with wel

Ezra Obiwale 35 Dec 13, 2022
Unleash the expressive power of the natural language in your Laravel application.

jrmajor/laravel-fluent Unleash the expressive power of the natural language in your Laravel application. Read the Fluent Syntax Guide in order to lear

Jeremiasz Major 17 Dec 17, 2022
This project demonstrates the power of soketi's WebSocket functionality in Laravel.

Laravel + soketi = <3 This project demonstrates the power of soketi's WebSocket functionality in Laravel. Installing the project The server requires:

Soketi 35 Dec 24, 2022
Give the power of Twig to Laravel

Allows you to use Twig seamlessly in Laravel. Requirements TwigBridge >= 0.13 supports Twig 3. If you need Twig 1/2 support, use the 0.12 versions. In

Rob Crowe 866 Jan 30, 2022
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

WebDevEtc. 227 Dec 25, 2022
Laravel messenger. A full messenger suite for your new / existing laravel app

Laravel messenger. A full messenger suite for your new / existing laravel app! Private and group threads between multiple models, with real-time messaging, reactions, attachments, calling, chat bots, and more!

Richard  Tippin 290 Dec 30, 2022
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Livewire 17.7k Jan 1, 2023
Laravel Livewire full page component routing.

Laravel Livewire Routes Laravel Livewire full page component routing. This package allows you to specify routes directly inside your full page Livewir

null 22 Oct 6, 2022
Use Blade templates without the full Laravel framework

blade Use Laravel Blade templates as a standalone component without the full Laravel framework Full documentation is available at http://duncan3dc.git

Craig Duncan 138 Dec 7, 2022
A full-featured Laravel package for aiding in Shopify App development

Laravel Shopify App A full-featured Laravel package for aiding in Shopify App development, similar to shopify_app for Rails. Works for Laravel 7 and u

Tyler King 1.2k Dec 19, 2022
A full-featured Laravel package for aiding in Shopify App development

Laravel Shopify App A full-featured Laravel package for aiding in Shopify App development, similar to shopify_app for Rails. Works for Laravel 7 and u

Tyler King 1.2k Jan 1, 2023
Bring multi themes support to your Laravel application with a full-featured Themes Manager

Introduction hexadog/laravel-themes-manager is a Laravel package which was created to let you developing multi-themes Laravel application. Installatio

hexadog 86 Dec 15, 2022
Viewi for Laravel: Build full-stack and completely reactive user interfaces with PHP.

[WIP] Laravel Viewi This is just a proof-of-concept. Don't use it in production! Viewi for Laravel: Build full-stack and completely reactive user inte

Protone Media 5 Jan 26, 2022
Un sitio web de películas realizado con Laravel y TailwindCSS para la Beca Neoris en Programación Full-Stack dictada por la Universidad Tecnológica Nacional.

Teatralidad Un sitio web realizado con Laravel y TailwindCSS para la Beca Neoris en Programación Full-Stack dictada por la Universidad Tecnológica Nac

Cristian Diego Góngora Pabón 2 Jan 14, 2022
💡 Full-featured code intelligence and smart autocomplete for Sublime Text

SublimeCodeIntel This Code Intelligence plugin for Sublime Text provides an interface to CodeIntel. CodeIntel is a code intelligence engine that was p

null 5.1k Dec 27, 2022