Hello,
The Symfony documentation references a non existant Searchable attribute,
While this seems to be worked on (meilisearch/meilisearch-symfony#387), the indices need to be configured in yaml.
The framework introduction should probably only describe the yaml way until the class attributes are available in the bundle.
|
## 3. Configure an entity for indexing |
|
|
|
Add the `Searchable` attribute to your Doctrine entity: |
|
|
|
```php |
|
<?php |
|
|
|
namespace App\Entity; |
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
use Meilisearch\Bundle\Searchable; |
|
|
|
#[ORM\Entity] |
|
#[Searchable(indexName: 'movies')] |
|
class Movie |
|
{ |
|
#[ORM\Id] |
|
#[ORM\GeneratedValue] |
|
#[ORM\Column] |
|
private ?int $id = null; |
Cheers
Hello,
The Symfony documentation references a non existant Searchable attribute,
While this seems to be worked on (meilisearch/meilisearch-symfony#387), the indices need to be configured in yaml.
The framework introduction should probably only describe the yaml way until the class attributes are available in the bundle.
documentation/getting_started/frameworks/symfony.mdx
Lines 43 to 62 in 9aaabc7
Cheers