-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
domain: searchRelated to the search feature, usually AlgoliaRelated to the search feature, usually AlgoliafeatureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
One of Algolia config options should be transformItems function which can filter/reorder the incoming search results prior to displaying to the user.
However, it seems like this function is not being picked up when defined in Docusaurus config at all.
Reproducible demo
Steps to reproduce
- Add algolia config to
docusaurus.config.js:
themeConfig: {
algolia: {
appId: 'X1Z85QJPUV',
apiKey: 'bf7211c161e8205da2f933a02534105a',
indexName: 'docusaurus-2',
contextualSearch: true,
transformItems: (items) => {
console.log(items); // This should log search hits, but does not.
return items;
}
},
}
- Try to search for something that returns results.
- Observe the console if the search hits are logged.
Expected behavior
Search hits should be logged to the console.
Actual behavior
Search hits are not logged to the console.
Your environment
- Public source code:https://github.com/h2oai/wave/tree/master/website
- Public site URL: https://wave.h2o.ai/
- Docusaurus version used: 2.1.0, but reproducible on latest as well
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome Version 108.0.5359.124 (Official Build) (x86_64)
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS 10.15.7
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
domain: searchRelated to the search feature, usually AlgoliaRelated to the search feature, usually AlgoliafeatureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.This is not a bug or issue with Docusausus, per se. It is a feature request for the future.