Open JuAlMan opened 3 months ago
It's because the save call to the database goes via a async call. Will change that behavior.
I tried:
"authentic_source": "DE:DRV70001",
"document_id": "123",
"document_type": "PDA1"
And then:
"authentic_source": "DE:DRV70001",
"document_id": "123",
"document_type": "EHIC"
It still doesn't seem to work, I get the following error: "document_already_exists".
Should be solved with, c706009186044bbae8851ab730455c16e18f9394
Please try the latest apiv28 docker tag.
I still get a duplicate key error. In the logs of the apigw container i get the following message:
Failed to save document {"error": "write exception: write errors: [E11000 duplicate key error collection: vc.datastore index: document_id_uniq dup key: { : \"12345\", : \"DE:DRV70001\" }]"}
It seems the document_type isn't respected as part of the unique key.
I used the 0.4.1 image tag now, but also tried with apiv28 and got the same error
Using image docker.sunet.se/dc4eu/apigw:apiv28
I uploaded a document with the following meta object:
Then i uploaded a second document by changing the document_type to "EHIC". Querying the document with Type PDA1 works just fine but when i try to query with type EHIC i get an error message that no documents could be found. This is the request i used for queriying the EHIC document:
As a document is identified by document_id, authentic_source and document_type it should be possible to upload documents with same id but different type.