Search - using Elasticsearch (or OpenSearch)


Scope

This page is for searches using Inventory UI or mod-search APIs (/search/...).

For searches using mod-inventory APIs (/inventory/...) or mod-inventory-storage APIs (/inventory-storage/...) see Search - using PostgreSQL.

Search and Filtering

In Inventory, we have implemented a button group to toggle between searching on the instance, holdings, or item level.

Search and filter options can be combined.

Search in the Instance segment supports search on bibliographic data.

Search in the Holdings and Item segments are a combination of key data from the Instance record, combined with holdings and item specific data elements. 

Search / filter options in Orchid


InstanceHoldingsItems
Search options

Filter options


Query Search using CQL (Instance, Holdings, Item segment)

For Kiwi the Query Search functionality (CQL) is limited to be only indexes supported by mod-search (Elasticsearch/OpenSearch). 

 (Please note that this page defaults to the master list, which may differ from your version of mod-search. To find your version of mod-search, in Folio go to Settings→Software versions, then look for mod-search. On the github page, there is a drop-down menu at the top that you can choose your version from.)

Supported search options


Examples

InstanceHoldingsItems

Electronic Access (all)

Example: electronicAccess any "resource"

Electronic Access (all)

Example: holdings.electronicAccess any "resource"

Electronic Access (all)

Example:  items.electronicAccess any "resource"

Electronic Access - URI

Example: electronicAccess.uri="http://folio.org*"

Electronic Access - URI

Example: holdings.electronicAccess.uri="http://folio.org*"

Example in Bugfest Lotus: holdings.electronicAccess.uri="http://uchicago.naxosmusiclibrary.com/catalogue/item.asp*"


Electronic Access - URI


Example: items.electronicAccess.uri="http://folio.org*"


Example in Bugfest Lotus:

items.electronicAccess.uri="http://proxy.library.tamu.edu/login?url=http://congressional.proquest.com/congcomp/getdoc?SERIAL-SET-ID=8226+H.rp.102*"


Electronic Access - Public Note

Example: electronicAccess.publicNote="a rare book"

Electronic Access - Public Note

Example:  holdings.electronicAccess.publicNote="a rare book"

Electronic Access - Public Note

Example: items.electronicAccess.publicNote="a rare book"

Electronic Access - Link Text

Example: electronicAccess.linkText="Folio website"

Electronic Access - Link Text

Example: holdings.electronicAccess.linkText="Folio website"

Electronic Access - Link Text

Example: items.electronicAccess.linkText="Folio website"

Public notes

Example: publicNotes all "public note"

Public notes

Example: holdingPublicNotes all "public note"

Public notes

Example: itemPublicNotes all "public note"


Holdings notes

Example: holdings.notes.note all "librarian note"

Circulation notes (all)

Example: items.circulationNotes.note all "circulation note"

ID

Example: id=="1234567"

All call number data elements

Example: holdingsFullCallNumbers="cn*434"

All call number data elements

Example: itemsFullCallNumbers="cn*434"

Alternative Titles

Example: alternativeTitles.alternativeTitle all semantic web

All holdings identifiers

Example: holdingIdentifiers = 1234

Normalized call number:

Example: itemsNormalizedCallNumbers="cn434"

Uniform Title

Example: uniformTitle all semantic web


Item UUID:

Example:  itemIdentifiers all "81ae0f60-f2bc-450c-84c8-5a21096daed9"

Series

Example: series all Cooperative information systems



Publisher

Example: publisher all MIT



Classification Number

Example: classifications.classificationNumber==025.04




Using boolean operators in Query Search (AND, OR, NOT)

When using Query Search, you can combine search terms with Boolean operators (AND, OR, NOT). 

You can also search on e.g. multiple ISBNs; e.g. Query search: isbn=9780763653378 OR isbn=0312087608 OR isbn=9781938461026 in Bugfest Orchid:

https://bugfest-orchid.int.aws.folio.org/inventory?qindex=querySearch&query=isbn%3D9780763653378%20OR%20isbn%3D0312087608%20OR%20isbn%3D9781938461026&sort=title

Query search also supports search on primary contributors; e.g. Query search:  contributors all "John" and contributors.primary==true in Bugfest Orchid:

https://bugfest-orchid.int.aws.folio.org/inventory?qindex=querySearch&query=contributors%20all%20%22John%22%20and%20contributors.primary%3D%3Dtrue&sort=title



Using Filter/Facets

When doing a search, then you can narrow down the search by using the filter/facet. Once you click on a filter/facet, you will only see the results that are relevant to your search. E.g., if you click the Effective location filter, it will only show you the locations contained in your search results, not the entire list of possible locations.

You can also choose to only use the filter/facets. E.g. get the result of all books in the collection in Swedish.

Search across all data properties

With elasticSearch, we can search across all three record types (instance, holdings, item) on values in any property. This is disabled by default, and must be turned on by your hosting provider or systems administrator.

Note that because this is disabled by default, it is not enabled on any of the reference environments.

Example: cql.all all "web semantic"

InstanceHoldingsItems

Search by all field values in the instance 

Example: cql.allInstances any "1234567"

Search by all field values in the holdings

Example:  cql.allHoldings all "ho001"

Search by all field values in the item

Example: cql.allItems all "book"


Advanced search (pending development)

Here some new UX mock ups for how Advanced search is envisioned, and expected to be implemented consistently across all apps supporting advanced search:




Examples that Advanced search will support:

  • cql.allRecords=1 NOT contributors=Smith matches all records where contributors name does not contain Smith as a word
  • cql.allRecords=1 NOT name="" matches all records where name is not defined.
  • cql.allRecords=1 NOT name=="" matches all records where name is defined and not empty or where name is not defined.

Browsing 

  • Call numbers
  • Subject

See UX-mock ups (Work in progress

Querying date fields

The instance record has several different types of data fields. 

Instance date fields - dateOfPublication and publicationPeriod

  • publication.dateOfPublication
  • publicationPeriod.start and publicationPeriod.end
    • publicationPeriod is meant to support sorting search results by publication date. It is a derived value field based on the values in dateOfPublication - see MODINVSTOR-724 - Getting issue details... STATUS for requirements on how start and end are populated based on dateOfPublication


Querying for publication date ranges

If your use case involves querying for instances based on publication year, consider searching on publicationPeriod rather than dateOfPublication. Even though publicationPeriod is not shown in the FOLIO Inventory UI, it is normalized year data from the publicationPeriod, so using it in your query can ensure that you are searching on a year and not having to worry about punctuation or other potential "stuff" in the data.


Instance, Holdings and Item date fields - metadata object

  • Metadata
    • This is a standard object present for almost all FOLIO records that tracks the FOLIO account that created the record, the FOLIO account that last updated the record, the date/time the record was created, and the date/time the record was last updated


Tips for searching

Quotations marks will generally be added for you, but you can also type them yourself. If you make a mistake typing and go back to edit, you may need to enter the quotation marks manually.

Occasionally you might have to play around a bit with the space bar and re-enter have gone back to edit something.

If you only want to do a keyword search, you can simply enter the search term.


Documentation on GitHub

Documentation on GitHub - see here

Search across all data elements - see here