Skip to content

ZCU-PUB/Partial match for community/collection search#1232

Open
Paurikova2 wants to merge 16 commits intocustomer/zcu-pubfrom
zcu-pub/partial-word-match-browsing
Open

ZCU-PUB/Partial match for community/collection search#1232
Paurikova2 wants to merge 16 commits intocustomer/zcu-pubfrom
zcu-pub/partial-word-match-browsing

Conversation

@Paurikova2
Copy link
Copy Markdown
Collaborator

@Paurikova2 Paurikova2 commented Mar 4, 2026

Problem description

The DSO selector search only matched whole words, preventing users from finding communities/collections with partial text input (e.g., typing "t" wouldn't find "test" community).

@vidiecan This is a potential upstream PR.

Solution

Implemented partial prefix matching for communities and collections using dc.title:query* search format, enabling single character and partial text searches to find relevant results from the beginning of titles.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

@Paurikova2
Copy link
Copy Markdown
Collaborator Author

@milanmajchrak If we want to include this PR, we should also offer it to Vanilla and cherry-pick it for other customers (mainly dtq-dev).

@Paurikova2 Paurikova2 changed the title added searching by query ZCU-PUB/Partial match for community/collection search Mar 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the DSO selector’s search behavior to support partial/prefix matching, primarily to improve discoverability of Communities/Collections when users type short or partial queries.

Changes:

  • Adds query preprocessing to rewrite non-empty user input into a prefix/wildcard query.
  • For Community/Collection searches, rewrites queries to a dc.title:<query>*-style fielded prefix query.
  • Passes the rewritten query into PaginatedSearchOptions instead of the raw input.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@Paurikova2 Paurikova2 requested a review from Copilot March 5, 2026 09:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

@Paurikova2 Paurikova2 requested a review from milanmajchrak March 5, 2026 12:18
@Paurikova2
Copy link
Copy Markdown
Collaborator Author

@milanmajchrak I wanted to add it to scenarios earlier, but then I realized we should first merge it into dtq-dev (zcu-pub isn’t used for testing).

milanmajchrak
milanmajchrak previously approved these changes Mar 13, 2026
@milanmajchrak milanmajchrak requested a review from vidiecan March 13, 2026 11:59
@Paurikova2 Paurikova2 removed the request for review from vidiecan March 17, 2026 12:08
@Paurikova2
Copy link
Copy Markdown
Collaborator Author

Solr/Lucene query syntax is already used directly in Angular in several other places (search.resourceid: in dso-selector, -search.resourceid: in item-collection-mapper, -location.coll: in collection-item-mapper). Moving this logic to the backend would require a larger cross-cutting refactoring. This PR is consistent with the existing pattern.

@Paurikova2
Copy link
Copy Markdown
Collaborator Author

@vidiecan Because this PR is no longer a vanilla PR (recent changes in vanilla already fix this issue), we decided to only remove references to Solr/Lucene from comments and method names instead of moving the implementation to the backend. Also, what supported our decision is that Solr/Lucene query syntax is already used directly in Angular in several other places, not just by us.

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.

3 participants