Requirements: MODORDERS-488 Investigate transition of Orders search to cross-index subqueries
Overview:
Endpoints calling views:
/orders-storage/receiving-history → receiving_history_view
Receiving view totally differs from other views. It is totaly builded on the fly and don has any own tables for persisting data. It could be switched to the cross index approach, but in this case instead of single database request there will be 3 requests which will return a large amount of data (collections of pieces, order lines and purchase orders). Making multiple requests and processing such large amount of data (which might be containing hundreds of elements withing each collection) wil not give any perfomance improvement.
For now we have to leave it as is.
/orders-storage/orders → orders_view
/orders-storage/po-lines → po_lines_view
/orders-storage/order-lines → order_lines_view
Prepared a POC with migration of this endpoint from searching accross the views to the searching via cross-indexes
...