Skip to content

feat(license): nouveau search migration for licenses endpoint - #4438

Merged
GMishx merged 1 commit into
eclipse-sw360:feat/search/reworkfrom
siemens:feat/license-search-nouveau-migration
Aug 6, 2026
Merged

feat(license): nouveau search migration for licenses endpoint#4438
GMishx merged 1 commit into
eclipse-sw360:feat/search/reworkfrom
siemens:feat/license-search-nouveau-migration

Conversation

@rudra-superrr

@rudra-superrr rudra-superrr commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description: Migrates the /api/licenses endpoint from the legacy CouchDB view-based search to CouchDB Nouveau (Lucene-backed) search, adding proper server-side pagination and sort support.

Files Changed

File Change
LicenseSearchHandler.java New Nouveau license search handler. Defines license index schema and sort mapping, adds OR-based quick search by fullname/id/shortname, and adds searchWithPagination with match-all query for blank search text.
LicenseSearchHandlerTest.java Unit test file for license Nouveau search behavior. Covers sort-column mapping plus the new pagination branch contract: blank search maps to match-all and non-blank search is trimmed.
LicenseDatabaseHandler.java Removed LicenseSearchHandler dependency and removed DB-layer search/pagination orchestration methods. Keeps DB/repository responsibilities; exposes convertToLicenseSummary for handler-level orchestration.
LicenseHandler.java Now owns LicenseSearchHandler and routes searchLicenseWithPagination through it, then converts results to license summaries. Removes legacy non-paginated searchLicense path.
licenses.thrift Contains LicenseSortColumn enum and paginated searchLicenseWithPagination method. Legacy non-paginated searchLicense method removed.
NouveauLuceneAwareDatabaseConnector.java addDesignDoc updated so a newly introduced index key is persisted into an existing design doc instead of being skipped. This is a shared Nouveau infrastructure fix, not license-only logic.
Sw360LicenseService.java Provides getLicensesWithPagination and paginated searchLicenses(searchText, pageable). pageableToPaginationData aligned to ProjectService style and maps sort properties including licenseType and score.
LicenseController.java Listing endpoint routes blank search to paginated list API and non-blank search to paginated quick-search API; OpenAPI tag text documents supported sort columns for paginated endpoints.

@GMishx GMishx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR is a mess.

Comment thread libraries/datahandler/src/main/thrift/licenses.thrift Outdated
@rudra-superrr rudra-superrr added the WIP work in progress label Aug 5, 2026
@rudra-superrr
rudra-superrr force-pushed the feat/license-search-nouveau-migration branch 3 times, most recently from 09be4d7 to 3c7ef72 Compare August 5, 2026 10:23
@rudra-superrr rudra-superrr removed the WIP work in progress label Aug 5, 2026

@GMishx GMishx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still needs fixes. Please check.

@rudra-superrr
rudra-superrr force-pushed the feat/license-search-nouveau-migration branch from 3c7ef72 to ba77540 Compare August 6, 2026 06:43
@rudra-superrr rudra-superrr added the WIP work in progress label Aug 6, 2026
@rudra-superrr
rudra-superrr force-pushed the feat/license-search-nouveau-migration branch from ba77540 to 6741b25 Compare August 6, 2026 07:39
@rudra-superrr rudra-superrr removed the WIP work in progress label Aug 6, 2026
@rudra-superrr
rudra-superrr force-pushed the feat/license-search-nouveau-migration branch 3 times, most recently from 5c0c0cd to c706f82 Compare August 6, 2026 08:38
Signed-off-by: rudra-superrr <prabhuchopra@gmail.com>
@rudra-superrr
rudra-superrr force-pushed the feat/license-search-nouveau-migration branch from c706f82 to c0e29e7 Compare August 6, 2026 08:53

@GMishx GMishx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes looks good.

@GMishx GMishx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested, working as expected.

@GMishx
GMishx merged commit 6ed7e0f into eclipse-sw360:feat/search/rework Aug 6, 2026
3 checks passed
@GMishx
GMishx deleted the feat/license-search-nouveau-migration branch August 6, 2026 09:10
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.

2 participants