-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Algolia plugin SearchPage does not respect configuration #3805
Comments
@slorber Can I work on this ? |
yes @ayshiff thanks, but let's first see how complex it might be Note, some users want to use both contextual search + additional facetFilters at the same time (#3804) @Shipow @francoischalifour the Algolia API we use for that search page looks different than the one we use for the Navbar input/dropdown (DocSearch), wonder if you know how we could make this more consistent, and also use docsearch apis on the search page instead of algoliasearch/lite and algoliasearch-helpers? It looks to me that the algolia site config we have is DocSearch props, but for the search page, we would have to convert Files: |
Enable docsearch module with provided configuration by algolia. Currently the search does not seem to work when `contextSearch` is enabled. This seems to be a temporary issue per Clement's mail: > As the DocSearch plugin is not active yet, you won't be able to use the Docusaurus `contextualSearch` option until next crawl. While this feature is not necessary (there are no versioned docs), it seems like the search results page has it enabled by default always ([1]) so might as well have it enabled everywhere to make sure it works. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [1]: https://github.com/temporalio/documentation/pull/357/files#r616656533 Ref: facebook/docusaurus#3805 Part of #2
Enable docsearch module with provided configuration by algolia. Currently the search does not seem to work when `contextSearch` is enabled. This seems to be a temporary issue per Clement's mail: > As the DocSearch plugin is not active yet, you won't be able to use the Docusaurus `contextualSearch` option until next crawl. While this feature is not necessary (there are no versioned docs), it seems like the search results page has it enabled by default always ([1]) so might as well have it enabled everywhere to make sure it works. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [1]: https://github.com/temporalio/documentation/pull/357/files#r616656533 Ref: facebook/docusaurus#3805 Part of #2 Close #22
Exactly, we are one of those users. Still relevant in Alpha.75 -> https://docs.boc-group.com/adonis/en/ |
My site is a single language project in Chinese. With |
The Search Page does not respect But it should still work, unless your Algolia index config is not up-to-date or it didn't crawl your site yet with the algolia plugin enabled. If your site is correctly configured (which I can't verify without seeing the conf and live URL), filtering on language should work. |
@slorber Thanks for explaining. I'm using docusaurus-2.json and self-hosted scraper with Docker. You can see the live demo here: https://openbayes-docs.pages.dev/docs |
The algolia theme is well installed on your site, and it has correct metadatas:
The config looks fine, but you probably have to set your own site's start URL so that it crawls your site instead of the Docusaurus site.
However, I'm surprised it does not work only in the search page. Also, if the modal does not work for @shortcuts any idea what could be going on? I'm not very familiar with the self-hosted scraper |
I re-scrap our site with the An unrelated issue I found is when typing something in the input it loses focus eveytime. But this is not reproducible on https://docusaurus.io/search |
Great that the recrawl fixed it. |
Hi, any update on this ticket? |
This continues to affect Docusaurus instances by creating an unexpected difference in behavior between the search bar and the search page. The solution was already discussed. What does this issue need to move forward? |
Still not fixed after 3 years? |
Still not fixed |
Hello, this is an issue in our project as well: we have custom facet filters that are required for the search to work properly, but they are not included in the query sent by the search page, so it consistently yields no results. This looks especially bad when the user ends up on the search page as a result of clicking the "See all x results" link from the bottom of the search results dropdown. Is there any chance that this issue is fixed in the near feature ? Thanks a lot ! |
This issue is unfortunately not a top priority for me right now. If someone from the community wants to work on it I'd be happy to review their PR but I can't work on it myself in the near future. |
🐛 Bug Report
Use some algolia config like:
Due to the presence of
bad:filter
, it should actually never find any result.But the current search page does not respect the plugin configuration options.
We should rather make the search page results consistent with the navbar search input / modal results, and use the plugin options.
Edit: if contextual search is not enable, we should not append any facet filter to the query by default, to prevent issues such as #4644
The text was updated successfully, but these errors were encountered: