ongr-io / ElasticsearchBundle

Symfony bundle for Elasticsearch with steroids
MIT License
313 stars 189 forks source link

No index found #955

Closed bogdaniel closed 4 years ago

bogdaniel commented 4 years ago

Been trying to figure out how to use the bundle based on the docs and if I don't add source_directories I get the following error on install:

In MappingPass.php line 65:

  Class \PermissionManager does not exist

And if I use the following config no error will be given on install of the bundle but I will get another error

ongr_elasticsearch:
  source_directories: ["%kernel.project_dir%/src/Elastic/Model"]
  indexes:
    App\Elastic\Model\Product:
      hosts: ["127.0.0.1:9200"]
In AbstractIndexServiceAwareCommand.php line 52:

  There is no index under `` name found. Available options: ``.

What I'm I doing wrong?

carlespibernat commented 4 years ago

I'm having the same issue with the error

In AbstractIndexServiceAwareCommand.php line 52:

  There is no index under `` name found. Available options: ``.

How did you solve it?

tkoumpouras commented 2 years ago
  /**
   * @ES\Property(type="integer") 
   */

instead of

  #[ES\Property(type:"integer")]

in general with PHP 8.0 the annotations not working