Skip to content

Override Sphinx integrated search with our indexes #1808

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

Merged
merged 15 commits into from
Feb 28, 2016
Merged

Conversation

agjohnson
Copy link
Contributor

The Sphinx search "works", but our search returns more relevant results. This work will include an integrated front end interface for search results on generated documentation which pulls from our existing indexes.

Implementing this feature might be difficult on a wider basis, as themes all load their local _static/searchtools.js. The easiest place to start would be by reimplementing searchtools.js with a similar interface, or extending the existing implementation, and overriding this in our local template overrides path. This would only affect projects using our theme, or derivatives of, for now.

The current searchtools.js implementation uses it's own search index data and performs its own text normalization and result scoring. An overridden implementation would rely on an elastic search backend, with supplemental information from the existing implementation. The current index has information on domain objects, which aren't surfaced in the same way in the search index. Results could be merged into the same search results tree, for display output. Features like highlighting in search results and the current search UI elements will be maintained.

  • Provide basic override of search tools javascript from Sphinx
  • Test with other themes
  • Test sub/super project display on listings
  • Explore merging domain objects -- can we detect duplicates easily in search results, or are search results enough?
  • Refactor to use search.lib
  • Move searchtools override to RTD sphinx ext
  • Fix linking to projects, add canonical url mapping for projects

This relies on readthedocs/readthedocs-sphinx-ext#16

@agjohnson agjohnson added the Improvement Minor improvement to code label Nov 5, 2015
@agjohnson agjohnson added this to the Search milestone Nov 5, 2015
@agjohnson agjohnson added the PR: work in progress Pull request is not ready for full review label Feb 5, 2016
@agjohnson agjohnson self-assigned this Feb 15, 2016
@agjohnson agjohnson added PR: ready for review Status: blocked Issue is blocked on another issue and removed PR: work in progress Pull request is not ready for full review labels Feb 23, 2016
@agjohnson agjohnson removed the Status: blocked Issue is blocked on another issue label Feb 26, 2016
@agjohnson
Copy link
Contributor Author

This is now unblocked. I created a sphinx_rtd_ext release branch of 0.6-alpha for staging some of our changes to moving changes into the ext. It would be good to get #1946 in this release as well.

agjohnson added a commit to readthedocs/readthedocs-sphinx-ext that referenced this pull request Feb 27, 2016
agjohnson added a commit to readthedocs/readthedocs-sphinx-ext that referenced this pull request Feb 28, 2016
agjohnson added a commit that referenced this pull request Feb 28, 2016
Override Sphinx integrated search with our indexes
@agjohnson agjohnson merged commit 42ab9d1 into master Feb 28, 2016
@agjohnson agjohnson deleted the indoc-search branch February 28, 2016 00:52
mikethebeer pushed a commit to crate/crate-docs-theme that referenced this pull request Mar 16, 2016
mikethebeer pushed a commit to crate/crate-docs-theme that referenced this pull request Mar 16, 2016
mikethebeer pushed a commit to crate/crate-docs-theme that referenced this pull request Mar 16, 2016
humitos added a commit that referenced this pull request Sep 30, 2024
humitos added a commit that referenced this pull request Oct 3, 2024
humitos added a commit that referenced this pull request Oct 7, 2024
* Domains: put a limit of 2 custom domains per project

Related #1808

* Domains: add tests for limit amount of domains

* Add missing import

* Test: define 2 domains as limit for all the tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant