📄 meilisearch.php
📁 Path: //home7/skhata/new.chandrapharma.com/config/meilisearch.php
📊 Size: 2.25 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
/**
* Meilisearch index configuration — Phase 4+
*
* Applied via: php artisan scout:sync-index-settings
*
* Reference: https://www.meilisearch.com/docs/reference/api/settings
*/
return [
'indexes' => [
/*
|--------------------------------------------------------------------------
| Products Index
|--------------------------------------------------------------------------
| filterable: fields that can be used in WHERE-style filters
| sortable: fields the client can sort results by
| ranking: custom ranking rules (ascending/descending on a field)
*/
config('app.env') . '_products' => [
'filterableAttributes' => [
'vendor_id',
'category_id',
'brand_id',
'status',
'product_type',
'is_featured',
'is_in_stock',
'is_on_sale',
'price',
'tags',
],
'sortableAttributes' => [
'price',
'published_at',
'created_at',
],
'searchableAttributes' => [
'name', // highest weight (first in list)
'sku',
'barcode',
'category_name',
'brand_name',
'description',
],
'displayedAttributes' => [
'id', 'name', 'slug', 'sku', 'price', 'compare_price',
'category_id', 'category_name', 'brand_id', 'brand_name',
'vendor_id', 'is_featured', 'is_in_stock', 'is_on_sale',
'product_type', 'status', 'published_at',
],
'rankingRules' => [
'words',
'typo',
'proximity',
'attribute',
'sort',
'exactness',
],
'typoTolerance' => [
'enabled' => true,
'minWordSizeForTypos' => [
'oneTypo' => 5,
'twoTypos' => 9,
],
],
'pagination' => [
'maxTotalHits' => 10000,
],
],
],
];