2

I don't mean filters, I mean settings: https://docs.meilisearch.com/reference/api/settings.html

So let's say I wanted to change the default Meilisearch 'stopword' setting for a specific model (or even all models)

$client->index('movies')->updateStopWords(['the', 'of', 'to']);

how could I do this?

Felix
  • 2,532
  • 5
  • 37
  • 75

1 Answers1

5

Scout creates a singleton with the Meilisearch client. That means you can access the instance from anywhere within your laravel container like this :

$client = app(\MeiliSearch\Client::class);
$client->index('movies')->updateStopWords(['the', 'of', 'to']);
  • 1
    Are you supposed to have this code somewhere in your app or do you run it as a one-off through the console? – neojp Aug 26 '21 at 23:31
  • @neojp The settings are not saved anywhere, they are read at runtime which means it has to be in your app, in `ScoutServiceProvider` for example. – Patrick Lamontagne Aug 29 '21 at 09:21