Skip to content

Add Group abstraction for cross-project search#12751

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/create-project-groups-abstraction
Draft

Add Group abstraction for cross-project search#12751
Copilot wants to merge 5 commits intomainfrom
copilot/create-project-groups-abstraction

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Implements project grouping to enable searching across related projects (subprojects, translations) with a single query parameter.

Changes

  • Model: Group with name, slug, and M2M to Project

  • Auto-grouping signals:

    • Subproject relationships → {parent-slug}-subprojects group
    • Translation relationships → {main-slug}-translations group
  • Search integration:

    • Query parser accepts project_group:slug syntax
    • Executor filters results by group membership
    • Supports multiple groups and combines with existing filters
  • Admin: Standard Django admin for manual group management

Usage

# Search API query
"django documentation project_group:django-subprojects"

# Multiple groups
"python project_group:group1 project_group:group2"

# Combined with project filter
"testing project_group:my-group project:specific-project"

Groups are created automatically when subprojects or translations are added. Projects can also be manually organized into groups via admin.

Original prompt

Work to create a abstraction called project groups that uses our search backend to group projects together into a set that can be searched across with a single queer perimeter. It should look like a group: name do some basic modeling and by default at all Sub projects to a project group, and all translations to another project group


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 4, 2026 07:00
Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com>
Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com>
Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com>
Copilot AI changed the title [WIP] Add project groups abstraction for searching projects Add ProjectGroup abstraction for cross-project search Feb 4, 2026
Copilot AI requested a review from ericholscher February 4, 2026 07:04
@ericholscher
Copy link
Member

@copilot just call it group, and fix tests and lunting..

Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 4, 2026

@copilot just call it group, and fix tests and lunting..

Done! Renamed ProjectGroup to Group throughout the codebase. All tests and linting pass. See commit 5ff1ccb.

Copilot AI changed the title Add ProjectGroup abstraction for cross-project search Add Group abstraction for cross-project search Feb 4, 2026
@humitos
Copy link
Member

humitos commented Feb 4, 2026

Just a quick note here. The backend to support this is already implemented and it's just a value in the API response from addons: https://github.com/readthedocs/readthedocs.org/blob/main/readthedocs/proxito/views/hosting.py#L467-L486

We need to create the UI for this as discussed in readthedocs/addons#22

@stsewd
Copy link
Member

stsewd commented Feb 4, 2026

Yeah, if this is only being used for search, we already support searching across different projects.

@ericholscher
Copy link
Member

ericholscher commented Feb 5, 2026

Yea, but the main thing here is creating named groups, so I can do things like deploy group:ops and find results only in our ops repos. It would be neat to have group:subprojects or similar, which I asked it to also automate, but what I really want is the grouping.

@humitos
Copy link
Member

humitos commented Feb 5, 2026

the main thing here is creating named groups, so I can do things like deploy group:ops and find results only in our ops repos

Gotcha.

I wouldn't go this direction just now without implementing the regular filters first. I think a few amount of these use cases are solved by the search filters we have thought about already. In fact, the UI is planned to a allow custom filters where you enter:

  • Name: Ops
  • Filter: project:ops project:devops project:another-ops-project

Then, it will be rendered in the UI as a Ops checkbox that you can tick it to automatically add the filter parameter.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants