Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search-index-default.json doesn't exist. #85

Closed
hossein-zare opened this issue Dec 14, 2021 · 5 comments
Closed

search-index-default.json doesn't exist. #85

hossein-zare opened this issue Dec 14, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@hossein-zare
Copy link

hossein-zare commented Dec 14, 2021

Please describe the bug you are seeing

Hello,
Untitled

When i start typing it's trying to GET https://hossein-zare.github.io/react-native-dropdown-picker-website/search-index-default.json 404 but it doesn't exist.

Untitled

How can we best reproduce the bug?

No response

Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?

"@cmfcmf/docusaurus-search-local": "^0.9.0",
"@docusaurus/core": "2.0.0-beta.13",

Which Node.js version are you using?

v16.13.0

Which theme are you using?

Yes, I am using @docusaurus/theme-classic

How does your plugin config look like?

plugins: [require.resolve("@cmfcmf/docusaurus-search-local")],

Additional context

https://hossein-zare.github.io/react-native-dropdown-picker-website

@hossein-zare hossein-zare added the bug Something isn't working label Dec 14, 2021
@cmfcmf cmfcmf closed this as completed in 9a17de6 Dec 14, 2021
@cmfcmf
Copy link
Owner

cmfcmf commented Dec 14, 2021

Thank you for rasing this issue! I fixed the code by no longer erroring when a particular search index does not exist. While this is not ideal, since it still does one unnecessary HTTP request, I hope that this is a decent intermediate solution.

@cmfcmf
Copy link
Owner

cmfcmf commented Dec 14, 2021

Released in 0.9.1 - let me know if it works for you 🚀

@hossein-zare
Copy link
Author

Thanks it's working fine now, The search results are ok. 😁
But the error is still there, I shouldn't be worried as you said it's no big deal.

@jafin
Copy link
Contributor

jafin commented Jan 18, 2022

@cmfcmf I am receiving a similar error. (v0.9.3)

Missing file search-index-default.json
returns 500 error from server

Result from search is no results.
Error in console:

main.7c543ba5.js:formatted:4931 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fieldVectors')
    at Function.A.Index.load (main.7c543ba5.js:formatted:4931:27)
    at main.7c543ba5.js:formatted:3819:49
    at c (main.7c543ba5.js:formatted:25321:32)
    at Generator._invoke (main.7c543ba5.js:formatted:25299:37)
    at Generator.next (main.7c543ba5.js:formatted:25351:37)
    at r (main.7c543ba5.js:formatted:197:29)
    at l (main.7c543ba5.js:formatted:211:25)

I'm new to docusaurus, I'll see if I can unminify this error to better understand the error.
If I place a dummy json file with the above name, search works as expected.

@cmfcmf
Copy link
Owner

cmfcmf commented Jan 19, 2022

Thank you for reporting, debugging and fixing this! Released the fix in v0.9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants