ZCU-PUB/Partial match for community/collection search#1232
ZCU-PUB/Partial match for community/collection search#1232Paurikova2 wants to merge 15 commits intocustomer/zcu-pubfrom
Conversation
|
@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). |
There was a problem hiding this comment.
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
PaginatedSearchOptionsinstead of the raw input.
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts
Outdated
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts
Outdated
Show resolved
Hide resolved
...ctor/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
Show resolved
Hide resolved
...ctor/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
Outdated
Show resolved
Hide resolved
...ctor/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
Show resolved
Hide resolved
...ctor/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
Show resolved
Hide resolved
...ctor/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts
Show resolved
Hide resolved
src/app/shared/dso-selector/dso-selector/dso-selector.component.ts
Outdated
Show resolved
Hide resolved
|
@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). |
|
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. |
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