-
Notifications
You must be signed in to change notification settings - Fork 230
fix(vendors): fix search and pagination #3522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(vendors): fix search and pagination #3522
Conversation
GMishx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A suggestion to not have this function.
backend/common/src/main/java/org/eclipse/sw360/datahandler/db/VendorRepository.java
Outdated
Show resolved
Hide resolved
GMishx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good.
66bf5fe to
d636809
Compare
1399cb4 to
9287afa
Compare
681e9b0 to
f45a00a
Compare
GMishx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change. Rest looks good.
Fix the search for Vendors and make responses DB paginated. Signed-off-by: Gaurav Mishra <[email protected]>
f45a00a to
f42f5af
Compare
Summary of changes :
Enhanced the VendorRepository to use view-based pagination with sorting. The key improvements include:
View Selection Logic: The getViewFromPagination() method maps sort column numbers to the appropriate CouchDB views (vendorbyfullname, vendorbyshortname, all)
Optimized Pagination: Uses queryViewPaginated() for better performance when sorting, with a fallback to index-based queries for reliability
Issue:
Suggest Reviewer
@GMishx
Note:
These changes also incorporate suggestions from apache/couchdb#5756