Have you read the Contributing Guidelines on issues?
Prerequisites
Description
When experimenting with the Algolia Crawler, I noticed that when contextual search is enabled no results are returned. The API requests are successful (status code 200), but no hits are returned.
I stumbled upon this Aloglia support thread trying to understand what might be causing the issue.
Upon closer investigation I noticed how the facetFilter parameter generated by Docusarus is incorrect compared to what Algolia expects.
The Crawler’s search UI includes the following values in the searchFacets query when I enable some custom facets such as as docusaurus_tag , version, and language.
[["docusaurus_tag:docs-default-4.3.x"],["version:4.3.x"],["lang:en"]]"}]}
This returns results as expected.
Now, in Docusarus, when contextual search in enabled, here is what is provided in the API request.
["language:en",["docusaurus_tag:default","docusaurus_tag:docs-default-current","docusaurus_tag:docs-api-current"]]"}]}
The list value is not generated correctly.
If I re-create the API post request with this vale for the faceFilter, I get the expected results.
facetFilters=[["docusaurus_tag:docs-default-4.3.x"],["version:4.3.x"],["lang:en"]]"}]}
Reproducible demo
No response
Steps to reproduce
You can use this codebox URL.
But or spin up a quick Docusarus project and use my Algolia config or the one included in the Algolia issue.
Expected behavior
The expected behavior is to return the expected results using the facefilter Docusarus includes in the post request.
Actual behavior
No results are returned.
Your environment
- Public source code.
- Public site URL: https://docs.spectrocloud.com
- Docusaurus version used: 3.2.1
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 18, Chrome 123.0.6312.123
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS 14.4.1 (23E224)
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
When experimenting with the Algolia Crawler, I noticed that when contextual search is enabled no results are returned. The API requests are successful (status code 200), but no hits are returned.
I stumbled upon this Aloglia support thread trying to understand what might be causing the issue.
Upon closer investigation I noticed how the
facetFilterparameter generated by Docusarus is incorrect compared to what Algolia expects.The Crawler’s search UI includes the following values in the searchFacets query when I enable some custom facets such as as docusaurus_tag , version, and language.
This returns results as expected.
Now, in Docusarus, when contextual search in enabled, here is what is provided in the API request.
The list value is not generated correctly.
If I re-create the API post request with this vale for the faceFilter, I get the expected results.
Reproducible demo
No response
Steps to reproduce
You can use this codebox URL.
But or spin up a quick Docusarus project and use my Algolia config or the one included in the Algolia issue.
Expected behavior
The expected behavior is to return the expected results using the facefilter Docusarus includes in the post request.
Actual behavior
No results are returned.
Your environment
Self-service