First indexing : error "Not enough rights to add an object"
eved42 opened this issue · comments
- Symfony version: 4.1
- Algolia Search Bundle version: 3.3
- Algolia Client Version: ?
- Language Version: ?
Description
When I tried to do my first indexing with command php bin/console search:import
I've got the following error :
Note : don't pay attention to the deprecated warning.
algolia_search.yaml
algolia_search:
prefix: '%env(APP_ENV)%_'
indices:
- name: customers
class: App\Entity\Customer
enable_serializer_groups: true
index_if: isIndexable
- name: prescribers
class: App\Entity\Prescriber
enable_serializer_groups: true
index_if: isIndexable
I added the Groups annotations in my entities and created a public function isIndexable()
to index only specific customers and prescribers.
Steps To Reproduce
I have a Symfony 4 simple project. I work locally on a PC with Wampserver. I've just installed your bundle, modified my entities and tried to do the first indexing.
I created an account on algolia.com and put the App Id and the Search-only API Key in the .env
file.
Hello @eved42 👋
Solution: Your .env file should contain the Admin API Key
.
Note that your Admin API key is very sensitive: it should never be shared with anyone and must remain confidential.
Please took a look on this section: algolia.com/doc/guides/security/api-keys
Ok thank you, it works !
You should update the doc to specify which API key use because there are 4 different.
I didn't see that algolia was paying. I was searching for a solution to increase the search engine in my project that I find a little bit slow. I have a table with more than 600k rows and it's difficult to show fast results.
Do you know other bundles about search for symfony ?
Thank you for your help. I will test your bundle and algolia. 👍
Thanks for the feedback!
You should address that question on the symfony slack (#support channel). Slack can be found here: https://symfony.com/community.