algolia / algolia/sphinx-docsearch
The list of search results always point to the `latest` documentation. Is there a way to handle search queries for multiple versions?
- Dominant language
- Python
- Stars
- 21
- Forks
- 1
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 4
Description
I'm using `sphinx-docsearch` to provide search results for `pydata-sphinx-theme`-themed documentation. The documentation is hosted on ReadTheDocs, and we're using RTD to host multiple versions of the documentation.
When I enable `sphinx-docsearch`, all the results point to the `latest` version (i.e. `https://my-docs.com/en/latest/`, even if I'm searching from a different version of the docs. How do I configure `sphinx-docsearch` to return only results from the version of the docs I'm currently looking at?
For local development replacing the base url with relative URLs instead of the `latest` docs would be helpful as well.
Contributor guide
Research direction
Start by reviewing sphinx-docsearch's configuration and how its generated result URLs use the ReadTheDocs versioned base URL. Done means searches from a non-latest version return only that version's results, while local development can use relative URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation, search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100