Open Faridun1992 opened 4 days ago
I will try to reproduce if the problem exists will be fixed
public function scoutIndexMigration(): array
{
return [
'fields' => [
'id' => ['type' => 'bigint'],
'title' => ['type' => 'text'],
'subtitle' => ['type' => 'text'],
'text' => ['type' => 'text'], // problem here
'categories' => ['type' => 'string stored indexed']
],
'settings' => [
'min_prefix_len' => 3,
'min_infix_len' => 3,
'expand_keywords' => 1,
],
];
}
'text' => ['type' => 'text']
conflict in the name of the column
Try to use a different name
public function scoutIndexMigration(): array { return [ 'fields' => [ 'id' => ['type' => 'bigint'], 'title' => ['type' => 'text'], 'subtitle' => ['type' => 'text'], 'text' => ['type' => 'text'], 'categories' => ['type' => 'string stored indexed'] ], 'settings' => [ 'min_prefix_len' => 3, 'min_infix_len' => 3, 'expand_keywords' => 1, ], ]; }
getting error php artisan manticore:index "App\Models\Post" SQLSTATE[42000]: Syntax error or access violation: 1064 P03: syntax error, unexpected TEXT, expecting identifier or tablename or MODIFY or TYPE near 'text text, categories string stored indexed) min_prefix_len = '3' min_infix_len = '3' expand_keywords = '1'' (Connection: manticore, SQL: CREATE TABLE
posts
(id bigint, title text, subtitle text, text text, categories string stored indexed) min_prefix_len = '3' min_infix_len = '3' expand_keywords = '1')