algolia / algoliasearch-helper-flutter

⚡️ Building block to create instant-search applications with Flutter
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/flutter/
Other
22 stars 15 forks source link

'demo_ecommerce' data search error: Method not allowed with this API key #113

Closed Patrick386 closed 10 months ago

Patrick386 commented 10 months ago

Algolia demo data: To read Algolia 'demo_ecommerce,' which key should I use? I've tried both the admin key and the search key, but I couldn't read the data. Thank you.

  HitsSearcher hitsSearcher = HitsSearcher(
    applicationID: Env.algoliaApplicationID,
    apiKey: Env.algoliaAdminKey, // adminKey 
    indexName: AlgoliaCredentials.demoEcommerceIndex, // demo_ecommerce
  );

image

image

search key: demo_ecommerce image

VladislavFitz commented 10 months ago

Hi @Patrick386,

To access the 'demo_ecommerce' index, you should typically use the search-only API key, as it is sufficient for performing searches within the index. However, since you mentioned encountering issues, could you please provide more details about the specific error or problem you're facing?

Patrick386 commented 10 months ago

Hi @Patrick386,

To access the 'demo_ecommerce' index, you should typically use the search-only API key, as it is sufficient for performing searches within the index. However, since you mentioned encountering issues, could you please provide more details about the specific error or problem you're facing?

Yes, that's correct. The search-only API key was sufficient. The issue was an error caused by a field in the model that didn't match the expected type. Thank you.