Replies: 4 comments
-
Might be related to this issue: #158 |
Beta Was this translation helpful? Give feedback.
-
Hey Thanks for this detailed research and explanation. I can completely understand that it was frustrating for you and I fully agree that there should be more information about it to avoid issues such as this one in the future. However, I am not into removing the current behavior as this DocSearch is now being used in many web applications (including Nuxt documentation) so I would like to propose to maybe write a better documentation about what options are send by default and how user should operate to overwrite them. Would that work for you? :) |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answer, Jakub! The current behavour could be changed for the I say this, because right now the module needs more setup than the official example. Ideally this module should also work out of the box, that would be the best developer experience. Other than that, the default language filter, which is English is disadvantageous for anyone whose content is not in English (and you can see even in my case where the content is English but got indexed as And last but not least, aligning with algolia's default behavour would cause less thinking overhead when using this module. User's won't have to take a mental note and remember that the original client does not use I can totally be in the minority by thinking this, and I'm happy to hear what other users think about this implementation^^ |
Beta Was this translation helpful? Give feedback.
-
Heyo, Thanks for this detailed explanation. I have created an issue for adding the docs as a temporary solution #170 and a task for removing default facetFilters #169 The first one I will add in the upcoming days, while the second I will add to the scope for 2.0.0 release. If you experience these kind of issues, other users may experience it as well so I am up for doing something with it. Let's also wait for some other comments :) |
Beta Was this translation helpful? Give feedback.
-
I'm not an algolia pro, so I can be easily wrong here. The situation that led me to create this Discussion, is that I recently created a new DocSearch project, which automatically got indexed by the algolia crawler. When I installed this module, whatever I typed in the search, I never got any result, however when I tried out the basic example from the original docs, everything worked:
When I looked into the requests that my nuxt application sent, and what the basic example sent, the difference was that the nuxt app added an extra
facetFilters: ["language:en"]"
to the request headers. After some digging I found that my automatically indexed site had thelang
attribute instead oflanguage
:However just changing the
langAttribute
in the options was not enough:This still didn't solve the issue, because the language should have been
en-US
instead of the defaulten
. It took me a lot of time to figure out that these are the options I need:Finding these things out took a lot of time, and it feels like it was a lot harder to start a project with the nuxt module instead of just using the basic example I shared above. I think it would be better to align with the native behaviour and not send any extra
facetFilters
, or make this explicitly opt in.I also had to look into the module's source code to know how to solve my issue, which is not really the best first experience for developers, I feel like the docs was missing the information I looked for while debugging this.
Beta Was this translation helpful? Give feedback.
All reactions