diff --git a/cmd/worker/workers/notice.go b/cmd/worker/workers/notice.go index 922e021..e783a7f 100644 --- a/cmd/worker/workers/notice.go +++ b/cmd/worker/workers/notice.go @@ -565,7 +565,6 @@ func (w *NoticeWorker) ToTender(n *notice.Notice) (*tender.Tender, error) { t.ProcurementProjectID = n.ProcurementProjectID t.SourceFileURL = n.SourceFileURL t.SourceFileName = n.SourceFileName - t.ContentXML = n.ContentXML // Preserve document-scraping/summarization flags on the tender (managed by // downstream workers), but refresh the notice-side processing metadata. t.ProcessingMetadata.ScrapedAt = n.ProcessingMetadata.ScrapedAt diff --git a/internal/tender/entity.go b/internal/tender/entity.go index 9a47d3c..7817e50 100644 --- a/internal/tender/entity.go +++ b/internal/tender/entity.go @@ -88,7 +88,6 @@ type Tender struct { Source TenderSource `bson:"source" json:"source"` SourceFileURL string `bson:"source_file_url" json:"source_file_url"` SourceFileName string `bson:"source_file_name" json:"source_file_name"` - ContentXML string `bson:"content_xml,omitempty" json:"content_xml,omitempty"` ProcessingMetadata ProcessingMetadata `bson:"processing_metadata" json:"processing_metadata"` // AIOverallSummary optional denormalized overall summary for search/list (e.g. synced from AI pipeline storage). AIOverallSummary string `bson:"ai_overall_summary,omitempty" json:"ai_overall_summary,omitempty"` diff --git a/internal/tender/repository.go b/internal/tender/repository.go index 9bd5110..5df01fb 100644 --- a/internal/tender/repository.go +++ b/internal/tender/repository.go @@ -27,7 +27,6 @@ type TenderRepository interface { // GetLatestByContractFolderIDs returns the most recently updated tender per distinct contract_folder_id. GetLatestByContractFolderIDs(ctx context.Context, contractFolderIDs []string) (map[string]*Tender, error) GetByProcurementProjectID(ctx context.Context, procurementProjectID string) (*Tender, error) - FindTendersWithContentXML(ctx context.Context, limit, skip int) ([]Tender, error) GetTenderCountByCountry(ctx context.Context) (map[string]int64, error) GetTenderCountByType(ctx context.Context) (map[string]int64, error) GetTenderCountByClassification(ctx context.Context) (map[string]int64, error) @@ -667,27 +666,6 @@ func (r *tenderRepository) GetByProcurementProjectID(ctx context.Context, procur return &result.Items[0], nil } -// FindTendersWithContentXML returns tenders that still have TED XML (for backfill after notices were deleted). -func (r *tenderRepository) FindTendersWithContentXML(ctx context.Context, limit, skip int) ([]Tender, error) { - filter := bson.M{"content_xml": bson.M{"$exists": true, "$ne": ""}} - pagination := orm.Pagination{ - Limit: limit, - Skip: skip, - SortField: "_id", - SortOrder: 1, - } - - result, err := r.ormRepo.FindAll(ctx, filter, pagination) - if err != nil { - r.logger.Error("Failed to list tenders with content_xml", map[string]interface{}{ - "error": err.Error(), - }) - return nil, err - } - - return result.Items, nil -} - // Update updates an existing tender func (r *tenderRepository) Update(ctx context.Context, tender *Tender) error { tender.UpdatedAt = time.Now().Unix()