Uploaded image for project: 'mod-search'
  1. mod-search
  2. MSEARCH-3

Instance - hierarchical filter by item effective locations - inventory

    XMLWordPrintable

Details

    • 8
    • None

    Description

      Purpose/Overview:
      Effective location is a derived field that is populated with the location data either from holdings or items records according to the logic described here.

      Each location consists out of hierarchical data that includes: institution, campuses, libraries and locations. Each location has a code and a name. When creating the facets for effective location we need to take into consideration that in large institutions (consortia, for example) there might be hundreds of locations and the user might be interested only in locations associated with just one library.

      Requirements/Scope:
      1. Instance search based on the item.effectiveLocationId https://github.com/folio-org/mod-inventory-storage/blob/c77c670cc054ad4afadfec647d69a1641d43fa2d/ramls/item.json#L306
      2. Facet should be on two levels:

      • Library as level 1 ( "name" and "code" elements)
      • Location as level 2 ("name and "code" elements)

      Approach:

      Acceptance criteria:

      • Search returns accurate hit count
      • Instances with holdings but not items records are included in the search as well
      • User can narrow down from library to location
      • User can limit instances search by location data associated with items or holdings

      Current CQL query example:
      (item.effectiveLocationId=="fcd64ce1-6995-48f0-840e-89ffa2288371") sortby title
      matches: instances that have items associated with Main Library location

      Additional information:
      The request GET /location-units/libraries returns

      {
        "loclibs": [
          {
            "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
            "name": "Main Library",
            "code": "ML",
            "campusId": "e838c9f0-e559-4872-958f-d9bc97ca1210"
          },
          {
            "id": "0df935eb-f3f4-4741-9ac6-33c500174b96",
            "name": "Agriculture Library Reserve",
            "code": "ALR",
            "campusId": "e838c9f0-e559-4872-958f-d9bc97ca1210"
          }
        ],
        "totalRecords": 2
      }
      

      Request GET /locations returns:

      {
        "id": "d9cd0bed-1b49-4b5e-a7bd-064b8d177231",
        "name": "Miller General Stacks",
        "code": "UA/CB/LC/GS",
        "isActive": true,
        "description": "The very general stacks of Miller",
        "discoveryDisplayName": "Miller General",
        "institutionId": "4b2a3d97-01c3-4ef3-98a5-ae4e853429b4",
        "campusId": "b595d838-b1d5-409e-86ac-af3b41bde0be",
        "libraryId": "e2889f93-92f2-4937-b944-5452a575367e",
        "details": {
          "a": "b",
          "foo": "bar"
        },
        "primaryServicePoint": "79faacf1-4ba4-42c7-8b2a-566b259e4641",
        "servicePointIds": [
          "79faacf1-4ba4-42c7-8b2a-566b259e4641"
        ]
      
      }
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                magdaz Magda Zacharska
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:

                  TestRail: Runs

                    TestRail: Cases