Skip to content

Mention of non existant Searchable attribute on the symfony bundle #3529

@louisboulagnon

Description

@louisboulagnon

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions