Skip to content

Solr-based suggestion / autocomplete#4439

Open
kshepherd wants to merge 3 commits intoDSpace:mainfrom
the-library-code:feature/TLC-790_solr_suggest_main
Open

Solr-based suggestion / autocomplete#4439
kshepherd wants to merge 3 commits intoDSpace:mainfrom
the-library-code:feature/TLC-790_solr_suggest_main

Conversation

@kshepherd
Copy link
Member

@kshepherd kshepherd commented Jun 5, 2025

Adds Solr-based suggestion to dynamic onebox vocabulary lookups.

See DSpace/DSpace#10855 for more notes

UI
In the dynamic-onebox Angular component which traditionally handles vocabulary / authority display like tree lookup or autocomplete, if the vocabulary type is "suggest", it will use a different search method and display template for the suggest terms. If not, the current behaviour is used (lookup / suggest from XML / etc)

Like the backend, the actual suggest term JSON is not fully modelled in Angular, it is just treated as JSON. This is done to keep things light (they are not proper DSpace addressable objects or anything, not used anywhere but as input providers) and due to the structure of the JSON where terms are used as key names, etc.

f31100b4-99df-4f9e-91cb-341cb6b66c3b

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@github-actions
Copy link

github-actions bot commented Jul 8, 2025

Hi @kshepherd,
Conflicts have been detected against the base branch.
Please resolve these conflicts as soon as you can. Thanks!

@strawburster strawburster force-pushed the feature/TLC-790_solr_suggest_main branch from 5b7602f to 6c6f045 Compare January 28, 2026 15:19
@strawburster
Copy link

I'm trying to limit the number of new properties on the onebox component, which is already quite a monstrous little thing. I combined the suggestion api and the vocabulary service into a single observable, and I want to combine the suggestrt/suggestrte templates with the existing rt and rte templates. Other than that, this is working as expected. I may adjust the spinner stylistically.

@tdonohue tdonohue moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Jan 30, 2026
@strawburster strawburster force-pushed the feature/TLC-790_solr_suggest_main branch 3 times, most recently from bca4d58 to 48550ca Compare February 4, 2026 12:04
@strawburster
Copy link

This is working the way I want it to. I made large changes to the onebox component, and I plan on adding more tests for it, as well as tests for the new search service method for getting suggestions. The existing tests should all pass (famous last words)

@tdonohue
Copy link
Member

@strawburster : Just to clarify, is this now ready for review? If so, we should move this PR out of "Draft" status . If you cannot do so, I can do that on your behalf.

@strawburster
Copy link

strawburster commented Feb 14, 2026

@tdonohue I'm not sure. I feel that this is done on the frontend, but the PR depends on DSpace/DSpace#10855 which is not ready yet. Also, I want to add tests but I suppose that can be part of the review. If you feel that it's appropriate you can change it for me, I do not have access because it is Kim's work.

@tdonohue
Copy link
Member

@strawburster : If this depends on another PR which is not yet ready, then it sounds like a test & review may not be easy to achieve. Once the other PR is ready, I can remove the "draft" status from both PRs at the same time. Just let me know when to remove the draft status.

@kshepherd
Copy link
Member Author

I've added the checklist template back into the issue description here to help us show review / merge readiness

@strawburster strawburster force-pushed the feature/TLC-790_solr_suggest_main branch from ae8cb98 to d8f1178 Compare February 19, 2026 13:54
@strawburster strawburster force-pushed the feature/TLC-790_solr_suggest_main branch from d8f1178 to 4a9cbfe Compare February 19, 2026 14:37
@strawburster
Copy link

I'm sorry I can't edit the checklist, but linting, circular dependencies, typedocs, i18n, and the last two, could be checked by now. The service implementation for suggestions is tested as far as I think I need to because of its simplicity, but I am still adding more tests to the onebox component for when the vocabulary is of type 'suggest'.

I expect one of the unit tests to fail, because there needs to be a hypermedia link between the discover and suggest endpoints before I can use the HAL service to look it up. This is a reminder to myself to do that once it becomes available in the backend.

@pnbecker pnbecker marked this pull request as ready for review February 19, 2026 14:52
@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 👀 Under Review in DSpace 10.0 Release Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 👀 Under Review

Development

Successfully merging this pull request may close these issues.

3 participants

Comments