Skip to content

feat(ui): enable partial matching for collection search#5579

Open
stevefulme1 wants to merge 1 commit intoansible:masterfrom
stevefulme1:feat/partial-search-matching
Open

feat(ui): enable partial matching for collection search#5579
stevefulme1 wants to merge 1 commit intoansible:masterfrom
stevefulme1:feat/partial-search-matching

Conversation

@stevefulme1
Copy link
Copy Markdown

Summary

  • Adds a "Collection name" filter using name__icontains for partial name matching — typing "sap" now returns all SAP-related collections (e.g., community.sap, community.sap_operations, etc.)
  • Changes the Namespace filter from exact match (namespace=X) to partial match (namespace__icontains=X) — typing "cisco" returns all Cisco namespaces
  • Keywords filter is unchanged — it continues to use the backend's full-text search across name, namespace, description, and tags

Problem

Previously, the Name and Namespace filters required exact matches. A user searching for "sap" in the name field would only find a collection named exactly "sap", missing collections like sap_hana, sap_operations, etc. This made content discovery unnecessarily difficult.

How it works

The Pulp/Django backend supports Django-style field lookups. The frontend now sends:

  • name__icontains=sap instead of requiring exact name match
  • namespace__icontains=cisco instead of namespace=cisco

These are case-insensitive substring matches handled natively by the backend.

Ref: AAP-67482

Test plan

  • Search by "Collection name" filter with partial text (e.g., "sap") — verify partial matches returned
  • Search by "Namespace" filter with partial text (e.g., "cisco") — verify partial matches returned
  • Verify "Keywords" search still works for broad full-text search
  • Verify empty state correctly shows when no filters are set
  • Verify TypeScript compiles without errors (npm run lint:ts)

🤖 Generated with Claude Code

Add "Collection name" filter using name__icontains for partial name
matching (e.g., typing "sap" matches all SAP-related collections).
Change Namespace filter from exact match to namespace__icontains
for partial namespace matching. Keywords filter is unchanged as it
uses the backend's full-text search.

Ref: AAP-67482

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant