PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Customizing Setting of Scout MeiliSearch

Written by Neo Likotsi on Jul 15th, 2021 Views Report Post

Laravel 8's scout package added support for a MeiliSearch engine see docs.

The functions exposed by Laravel Scout are good to build the basic search query against your index, but I found that is not straight forward to do a WhereIn query.

Fortunately, scout allows us to customize the query to build a more complex query.

use MeiliSearch\Endpoints\Indexes;

...

$searchable->search($query, function(Indexes $meiliSearch, $query, $options) { ... });

In the callback function is where you can customize the filters in the options object to tell MeiliSearch how to pass a search. You can check the documentation to search for the options available in the query language.

Comments (0)

loading comments