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

Show subprojects in search results #1866

Merged
merged 5 commits into from Feb 28, 2016

Conversation

Projects
None yet
4 participants
@agjohnson
Contributor

agjohnson commented Feb 15, 2016

Currently, file/section/etc searches show results from a queried project, but it would also be helpful to display results from subprojects. This could easily be performed by appending the subproject slugs/ids to the search queries that are searching for a specific project. Display would be altered comparing the project slug, and if different, noting "from project X" in a fashion similar to the way domain objects are displayed separately in project search.

Routing

The index routing will need to be changed here as well, as it is currently per-project, which will limit project responses. Projects can be routed to their root parent projects, to keep sub/super-projects all on the same shard. However, this creates some difficulty querying from inside a subproject:

  • Which route do we use when a project has multiple parent projects and a query is requested directly for this project?
  • Do we update the indexes for each route when a project has multiple parent projects?

Indexing should be updated to respect many to many relationships between projects, and multiple indexes will be updated when updating search indexes.

  • Update search queries to include subprojects, if any
  • Also include superprojects, if any?
  • Update routing on indexing, route to parent or root parent project
  • Display results in search output with project designation
  • Correct links to subproject pages in search results

This relies on #1808 and rtfd/readthedocs-sphinx-ext#16

In action:
screen shot 2016-02-23 at 3 13 27 pm

Show outdated Hide outdated readthedocs/search/lib.py Outdated
@ericholscher

This comment has been minimized.

Show comment
Hide comment
@ericholscher

ericholscher Feb 24, 2016

Member

LGTM 👍

Member

ericholscher commented Feb 24, 2016

LGTM 👍

@agjohnson

This comment has been minimized.

Show comment
Hide comment
@agjohnson

agjohnson Feb 26, 2016

Contributor

I addressed a few issues and rebased this. #1808 and this are unblocked now.

Contributor

agjohnson commented Feb 26, 2016

I addressed a few issues and rebased this. #1808 and this are unblocked now.

agjohnson added a commit to rtfd/readthedocs-sphinx-ext that referenced this pull request Feb 27, 2016

agjohnson added a commit to rtfd/readthedocs-sphinx-ext that referenced this pull request Feb 28, 2016

agjohnson added a commit that referenced this pull request Feb 28, 2016

@agjohnson agjohnson merged commit 32cab96 into master Feb 28, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@agjohnson agjohnson deleted the indoc-subproject-search branch Feb 28, 2016

@pgiraud

This comment has been minimized.

Show comment
Hide comment
@pgiraud

pgiraud Jul 19, 2018

Can someone please confirm that it only work with sphinx and not with mkdocs?

pgiraud commented Jul 19, 2018

Can someone please confirm that it only work with sphinx and not with mkdocs?

@RichardLitt

This comment has been minimized.

Show comment
Hide comment
@RichardLitt

RichardLitt Jul 19, 2018

Member

@pgiraud This is a pretty old issue, and your comment is likely to be lost, I think. I would encourage opening a new one and linking here. Thanks.

Member

RichardLitt commented Jul 19, 2018

@pgiraud This is a pretty old issue, and your comment is likely to be lost, I think. I would encourage opening a new one and linking here. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment