Enhance Tender Management with Company-Based Matching and API Updates
- Updated the tender service to include company-based matching for tenders, allowing for more relevant results based on company CPV codes. - Modified the ListTenders endpoint to accept a company ID parameter for calculating match percentages and sorting tenders accordingly. - Refactored the tender response structure to include match percentage and days until deadline for better client-side handling. - Updated API documentation to reflect changes in the tender listing functionality and added new endpoints for public tender access. - Removed deprecated customer-related methods and streamlined customer listing functionality for improved clarity and performance.
This commit is contained in:
@@ -86,6 +86,13 @@ func NewTenderRepository(mongoManager *mongopkg.ConnectionManager, logger logger
|
||||
{Key: "notice_type_code", Value: 1},
|
||||
{Key: "status", Value: 1},
|
||||
}),
|
||||
// Index for CPV matching queries
|
||||
*mongopkg.NewIndex("cpv_matching_idx", bson.D{
|
||||
{Key: "status", Value: 1},
|
||||
{Key: "main_classification", Value: 1},
|
||||
{Key: "additional_classifications", Value: 1},
|
||||
{Key: "publication_date", Value: -1},
|
||||
}),
|
||||
// Text index for search
|
||||
*mongopkg.CreateTextIndex("search_idx", "title", "description"),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user