Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-238

Search indexes for keyword search of order lines

    XMLWordPrintable

    Details

    • Type: Tech Debt
    • Status: Open (View Workflow)
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 11.1.4, 13.0.2
    • Fix Version/s: None
    • Template:
    • Development Team:
      Thunderjet
    • Affected Institution:
      University of Chicago

      Description

      In a Honeysuckle, Iris or Juniper system with a fairly large orders dataset, the UI keyword search of order lines performs badly:

      Sample request: https://uchicago-test-okapi.folio.indexdata.com/orders/order-lines?limit=30&offset=0&query=%28%28contributors%3D%3D%22%2Acookbook%2A%22%20or%20poLineNumber%3D%3D%22%2Acookbook%2A%22%20or%20requester%3D%3D%22%2Acookbook%2A%22%20or%20titleOrPackage%3D%3D%22%2Acookbook%2A%22%20or%20publisher%3D%3D%22%2Acookbook%2A%22%20or%20vendorDetail.vendorAccount%3D%3D%22%2Acookbook%2A%22%20or%20vendorDetail.refNumber%3D%3D%22%2Acookbook%2A%22%20or%20donor%3D%3D%22%2Acookbook%2A%22%20or%20selector%3D%3D%22%2Acookbook%2A%22%20or%20physical.volumes%3D%3D%22%2Acookbook%2A%22%20or%20details.productIds%3D%3D%22%2Acookbook%2A%22%29%29%20sortby%20poLineNumber%2Fsort.descending

      CQL query after percent decoding:

      ((contributors=="*cookbook*" or poLineNumber=="*cookbook*" or requester=="*cookbook*" or titleOrPackage=="*cookbook*" or publisher=="*cookbook*" or vendorDetail.vendorAccount=="*cookbook*" or vendorDetail.refNumber=="*cookbook*" or donor=="*cookbook*" or selector=="*cookbook*" or physical.volumes=="*cookbook*" or details.productIds=="*cookbook*")) sortby poLineNumber/sort.descending
      

      This is the request sent to mod-orders-storage /orders-storage/po-lines API:

      (purchaseOrder.acqUnitIds=(0ebb1f7d-983f-3026-8a4c-5318e0ebc041) or (cql.allRecords=1 not acqUnitIds <> [])) and (((contributors=="*cookbook*" or poLineNumber=="*cookbook*" or requester=="*cookbook*" or titleOrPackage=="*cookbook*" or publisher=="*cookbook*" or vendorDetail.vendorAccount=="*cookbook*" or vendorDetail.referenceNumbers=="*cookbook*" or donor=="*cookbook*" or selector=="*cookbook*" or physical.volumes=="*cookbook*" or details.productIds=="*cookbook*"))) sortby metadata.updatedDate/sort.descending
      

      The request results in a full table scan of the po_orders table because no database index is used.

      Task: Add database indexes to schema.json to accelerate the search.

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dennisbridges Dennis Bridges
                Reporter:
                wayne Wayne Schneider
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases