Repository navigation
Feature/document import - #29
Conversation
7ecc25a to
2a17f3a
Compare
cookel2
left a comment
There was a problem hiding this comment.
I was able to export the documents.csv, then add details of a new document from prod, then import it with my changes successfully. I then deleted the documents.csv from the root and re-ran the export to check that the change would be exported, which it was, so that all worked well. Just a few suggestions here.
| return exportCmd, nil | ||
| } | ||
|
|
||
| func rebuildJudgementsCommand(outputPath *string) *cobra.Command { |
There was a problem hiding this comment.
The outputPath parameter is unused so can be deleted.
| github.com/ONSdigital/dp-healthcheck v1.6.4 // indirect | ||
| github.com/ONSdigital/dp-net/v3 v3.5.0 // indirect | ||
| github.com/ONSdigital/dp-otel-go v0.0.8 // indirect | ||
| github.com/ONSdigital/dp-search-api v1.59.0 // indirect |
There was a problem hiding this comment.
It looks like you might need to run a go mod tidy as this has become a direct dependency.
| import-judgements: | ||
| go run main.go import judgements -i judgements.csv | ||
|
|
||
| import-documents: |
There was a problem hiding this comment.
It would be nice to add this to the readme with details of how to get the information that needs to go into the documents.csv i.e. the doc_id, uri, and title. I think that last 2 are pretty obvious but for the doc_id I was unsure whether I should be looking for something or just making it up?
2e739a0 to
a239138
Compare
a239138 to
cb97386
Compare
What
Added document import command - it will add documents by using production data and then it will rebuild the term judgements by checking what documents are returned for each term.
I've additionally exposed the 'rebuildTermJudgements' to the CLI in case we want to rebuild for any other reason.
How to review
Try it by exporting the documents and the adding a new one from the ONS website.
Who can review
Not me.