IO-2801 os-loader bills data
add in job object to bills in opensearch for ro_number to be searchable again Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -174,10 +174,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
||||
const bulkOperation = [];
|
||||
slicedArray.forEach((bill) => {
|
||||
bulkOperation.push({ index: { _index: "bills", _id: bill.id } });
|
||||
bulkOperation.push({
|
||||
...omit(bill, ["job"]),
|
||||
bodyshopid: bill.job.bodyshopid
|
||||
});
|
||||
bulkOperation.push({ ...bill, bodyshopid: bill.job.bodyshopid });
|
||||
});
|
||||
promiseQueue.push(bulkOperation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user