algolia / docsearch

:blue_book: The easiest way to add search to your documentation.
https://docsearch.algolia.com
MIT License
3.87k stars 375 forks source link

Object has no key lvl0 #184

Closed calcyu closed 2 years ago

calcyu commented 7 years ago

Uncaught (in promise) Error: [groupBy]: Object has no key lvl0 at Object. (docsearch.min.js:4) at Function.t.exports.T.each (docsearch.min.js:2) at Object.groupBy (docsearch.min.js:4) at Function.value (docsearch.min.js:4) at docsearch.min.js:4

vvo commented 7 years ago

Hi @calcyu, can you give us more context about where this error happens? On which website? So we can reproduce it, thanks.

alcalyn commented 6 years ago

Maybe related to https://github.com/algolia/docsearch/issues/186 It seems that you have to generate your index using docsearch crawler

Haroenv commented 6 years ago

That's right @alcalyn, this could happen if you're using docsearch with an index not made with the crawler. If you made your index yourself without docsearch, you can use autocomplete.js or InstantSearch directly without using docsearch

Haroenv commented 6 years ago

but more info is needed, as @vvo said

s-pace commented 6 years ago

Must be fixed. Feel free to re open it if needed

s-marques commented 2 years ago

Good afternoon, has anyone managed to solve the problem? I have the same problem as docsearch.min.js:5 Uncaught (in promise) Error: [groupBy]: Object has no key lvl0

Haroenv commented 2 years ago

Do you use the latest version of docsearch @s-marques? is there somewhere this can be reproduced?

s-marques commented 2 years ago

I'm using the Docusaurus version 1.14.7 and there is the website links.dev.br

Em seg., 13 de set. de 2021 às 04:43, Haroen Viaene < @.***> escreveu:

Do you use the latest version of docsearch @s-marques https://github.com/s-marques? is there somewhere this can be reproduced?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algolia/docsearch/issues/184#issuecomment-917927109, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR2O4DX2PSHQWJK44MIVLTUBWTR7ANCNFSM4DQR76HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

shortcuts commented 2 years ago

Hey @s-marques, I can't find an index name for this website links.dev.br, but by the error, I assume the lvl0 selector of your config file is incorrect. Would you mind sharing the config you are using?

s-marques commented 2 years ago

I'm not able to configure Algolia with my docusaurus project, I always get this error Uncaught (in promise) Error: [groupBy]: Object has no key lvl0

On siteConfig, I just informed apiKey, indexName and appId, on Algolia's website I sent the json that is attached

Em seg., 13 de set. de 2021 às 09:28, Clément Vannicatte < @.***> escreveu:

Hey @s-marques https://github.com/s-marques, I can't find an index name for links.dev.br, but by the error, I assume the lvl0 selector of your config file is incorrect. Would you mind sharing the config you are using?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algolia/docsearch/issues/184#issuecomment-918142311, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR2O4GPHA6XNDGUBBF4W7DUBXVAFANCNFSM4DQR76HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

shortcuts commented 2 years ago

Thanks @s-marques, could you please provide the appId and indexName so that we can investigate?

s-marques commented 2 years ago

apiKey: "39a3d8c529d3c9fe77851e3ebfef2147", indexName: "linksdev", appId:"WG1WM749V9",

Em seg., 13 de set. de 2021 às 10:54, Clément Vannicatte < @.***> escreveu:

Thanks @s-marques https://github.com/s-marques, could you please provide the appId and indexName so that we can investigate?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/algolia/docsearch/issues/184#issuecomment-918215268, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABR2O4E7T7MIZRF3NVZQDW3UBX7BRANCNFSM4DQR76HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

s-marques commented 2 years ago

I don't know if there's any more configuration missing to do in docusaurus

shortcuts commented 2 years ago

Thanks!

Looking at the search query response, it seems that your records doesn't follow the shape of a DocSearch record.

With DocSearch, we require the Algolia records to follow a specific shape. You can achieve this by running our custom scraper to index your website: https://docsearch.algolia.com/docs/run-your-own/

To do so, you'll need a configuration file and as you are running Docusaurus v1, you can take this one as a starter: https://github.com/algolia/docsearch-configs/blob/master/configs/docusaurus.json