Description
I try to attach my Symfony 5.4.12 project to Meilisearch, but I cannot import data into the index. I installed the bundle successfully. This is how my composer.json file looks like:
The MeilisearchBundle was also automatically added to the bundles.php of Symfony.
I then created a meilisearch.yaml file in the config/packages folder.
The documentation sometimes uses meilisearch.yaml and sometimes meili_search.yaml. So, I am not certain, what is the right name.
The content of the meilisearch.yaml file looks like this:
meilisearch:
url: '%env(MEILISEARCH_URL)%' # URL of the Meilisearch server (mandatory)
api_key: '%env(MEILISEARCH_API_KEY)%' # API key to access the Meilisearch server (mandatory)
nbResults: 22 # Retrieve fewer results on search (default: 20)
doctrineSubscribedEvents: [] # disable doctrine events (turn off realtime sync)
batchSize: 555 # calls to Meilisearch to index or remove data are batched per items (default: 500)
indices:
- name: articles
class: App\Entity\InterfaceArticle
enable_serializer_groups: true
I also added the env-variable to my .env.local file like this:
When I now run the command php bin/console meili:import I get the message:
No indices specified. Please either specify indices using the cli option or YAML configuration.
Done!
When I run the command php bin/console meili:import --indices=articles then I get this message, but nothing happens:
Done!
I also see in the console of the Docker container that nothing is happening there when I run the command.
I looked into the file MeilisearchImportCommand.php and added a dd($config); in line 72:
When I run the command again, the output is like this:
So, it is not picking up the configuration from my meilisearch.yaml file at all.
What am I doing wrong?
Any advice is appreciated.
Expected behavior
The Meilisearch importer picks up the configuration from the yaml file and process the import properly.
Current behavior
The import is not running at all.
Environment (please complete the following information):
OS: MacOS 12.6.3 with PHP 8.1.1
Meilisearch version: [e.g. v.1.0.0] running in a Docker container.
Description I try to attach my Symfony 5.4.12 project to Meilisearch, but I cannot import data into the index. I installed the bundle successfully. This is how my composer.json file looks like:
The MeilisearchBundle was also automatically added to the bundles.php of Symfony.
I then created a meilisearch.yaml file in the config/packages folder. The documentation sometimes uses meilisearch.yaml and sometimes meili_search.yaml. So, I am not certain, what is the right name.
The content of the meilisearch.yaml file looks like this:
I also added the env-variable to my .env.local file like this:
Finally I added the groups-attributes to my InterfaceArticle class:
When I now run the command php bin/console meili:import I get the message:
When I run the command php bin/console meili:import --indices=articles then I get this message, but nothing happens:
I also see in the console of the Docker container that nothing is happening there when I run the command.
I looked into the file MeilisearchImportCommand.php and added a dd($config); in line 72: When I run the command again, the output is like this: So, it is not picking up the configuration from my meilisearch.yaml file at all.
What am I doing wrong? Any advice is appreciated.
Expected behavior The Meilisearch importer picks up the configuration from the yaml file and process the import properly.
Current behavior The import is not running at all.
Environment (please complete the following information):