Archival description quality control with ElasticSearch queries

Introduction


  • This page provides information on how to use ElasticSearch queries to perform routine quality control of archival descriptions.

  • Editors and contributors can use search results as a "checklist" of records with specific errors or omissions to be corrected. 

  • Users should log into the Archives Catalogue before performing quality control queries. Unauthenticated users cannot see draft archival descriptions. 

Search for draft or published archival descriptions


Use the following ElasticSearch queries to find draft or published archival descriptions. 

Search queryPurposeExpected results
publicationStatusId:159Find all draft archival descriptionsVariable, should match the number of draft descriptions identified in the "available drafts" notification that appears after logging in.
publicationStatusId:160Find all published archival descriptionsVariable, should match the total number of archival descriptions available to unauthenticated users that browse by title.

Search for recently created or modified archival descriptions


Use the following ElasticSearch queries to find recently created or modified archival descriptions. Modify the YYYY-MM-DD values as needed.

Search queryPurposeExpected results
createdAt:[YYYY-MM-DD TO YYYY-MM-DD]
Find all archival descriptions created between the dates provided in the queryVariable
updatedAt:[YYYY-MM-DD TO YYYY-MM-DD]
Find all archival descriptions last modified between the dates provided in the queryVariable
createdAt:[* TO YYYY-MM-DD]Find all archival descriptions created before the date provided in the queryVariable
updatedAt:[* TO YYYY-MM-DD]Find all archival descriptions modified before the date provided in the queryVariable
createdAt:[YYYY-MM-DD TO *]Find all archival descriptions created after the date provided in the queryVariable
updatedAt:[YYYY-MM-DD TO *]Find all archival descriptions modified after the date provided in the queryVariable

Search for missing or existing data in the archival description


Use the following ElasticSearch queries to find draft or published archival descriptions. 

Search queryPurposeExpected results

!_exists_:repository.i18n.en.authorizedFormOfName

Find archival descriptions without a repositoryZero results
_exists_:i18n.en.titleFind archival descriptions with mandatory titleAll archival descriptions
!_exists_:i18n.en.titleFind archival descriptions without mandatory titleZero results
_exists_:alternateTitleFind all archival descriptions with an alternate titleN/A 
!_exists_:alternateTitleFind all archival descriptions without an alternate titleN/A
!_exists_:materialTypeIdFind archival descriptions without a general material designation (GMD) noteZero results
_exists_:materialTypeIdFind archival descriptions with a general material designation (GMD) noteAll archival descriptions
_exists_:i18n.en.archivalHistoryFind archival descriptions with custodial history note. Combine with "top-level descriptions" radio button in advanced searchAll top-level archival descriptions
!_exists_:i18n.en.archivalHistoryFind archival descriptions without custodial history note. Combine with "top-level descriptions" radio button in advanced searchZero results
_exists_:i18n.en.scopeAndContentFind archival descriptions with scope and content note
!_exists_:i18n.en.scopeAndContentFind archival descriptions without a scope and content note
!_exists_:i18n.en.scopeAndContent AND hasDigitalObject:1Find archival descriptions without a scope and content note AND includes a digital objectZero results
_exists_:i18n.en.scopeAndContent AND hasDigitalObject:1Find archival descriptions with a scope and content note AND a digital objectAll archival descriptions with digital objects
_exists_:i18n.en.extentAndMediumFind all archival descriptions with a physical descriptionAll archival descriptions
!_exists_:i18n.en.extentAndMediumFind all archival descriptions without a physical descriptionZero results
!_exists_:i18n.en.accessConditionsFind archival descriptions without restrictions on access notes. Combine with "top-level descriptions" radio button in advanced search.All top-level archival descriptions
_exists_:i18n.en.accessConditionsFind archival descriptions with restrictions on access notes. Combine with "top-level descriptions" radio button in advanced search.Zero results
_exists_:subjects.i18n.en.nameFind archival descriptions linked to subject headings
!_exists_:subjects.i18n.en.nameFind archival descriptions that are not linked to subject headings



_exists_:places.i18n.en.name

!_exists_:places.i18n.en.name

Search for archival descriptions linked to authority records as a "creator"


Use the following queries to search for archival descriptions linked to "creator" authority records that include or do not include certain elements in the ISAAR-CPF "Identity Area."

Search queryPurposeExpected results
_exists_:creators.i18n.en.authorizedFormOfNameFind archival descriptions linked to authority recordsVariable
!_exists_:creators.i18n.en.authorizedFormOfNameFind archival descriptions that are not linked to authority recordsVariable
_exists_:creators.otherNames.i18n.en.nameFind archival descriptions linked to authority records with an "Other form(s) of name" entry in the Identify Area (ISAAR 5.1.5)Variable
!_exists_:creators.otherNames.i18n.en.name

Find archival descriptions linked to authority records without an "Other form(s) of name" entry in the Identify Area (ISAAR 5.1.5)

Variable
_exists_:creators.parallelNames.i18n.en.nameFind archival descriptions linked to authority records with a "Parallel form(s) of name" entry in the Identify Area (ISAAR 5.1.3)Variable
!_exists_:creators.parallelNames.i18n.en.nameFind archival descriptions linked to authority records without a "Parallel form(s) of name" entry in the Identify Area (ISAAR 5.1.3)Variable
_exists_:creators.standardizedNames.i18n.en.nameFind archival descriptions linked to authority records with a "Standardized form(s) of name according to other rules" entry in the Identify Area (ISAAR 5.1.4)
!_exists_:creators.standardizedNames.i18n.en.nameFind archival descriptions linked to authority records without a "Standardized form(s) of name according to other rules" entry in the Identify Area (ISAAR 5.1.4)

Search for archival descriptions linked to authority records as a "name access point"


Use the following queries to search for archival descriptions linked to authority records as a "name access point."

Search queryPurposeExpected results
_exists_:names.i18n.en.authorizedFormOfNameFind archival descriptions linked to authority recordsVariable
!_exists_:names.i18n.en.authorizedFormOfNameFind archival descriptions that are not linked to authority recordsVariable
_exists_names.otherNames.i18n.en.nameFind archival descriptions linked to authority records with an "Other form(s) of name" entry in the Identify Area (ISAAR 5.1.5)Variable
!_exists_:names.otherNames.i18n.en.name

Find archival descriptions linked to authority records without an "Other form(s) of name" entry in the Identify Area (ISAAR 5.1.5)

Variable
_exists_:names.parallelNames.i18n.en.nameFind archival descriptions linked to authority records with a "Parallel form(s) of name" entry in the Identify Area (ISAAR 5.1.3)Variable
!_exists_:names.parallelNames.i18n.en.nameFind archival descriptions linked to authority records without a "Parallel form(s) of name" entry in the Identify Area (ISAAR 5.1.3)Variable
_exists_:names.standardizedNames.i18n.en.nameFind archival descriptions linked to authority records with a "Standardized form(s) of name according to other rules" entry in the Identify Area (ISAAR 5.1.4)
!_exists_:names.standardizedNames.i18n.en.nameFind archival descriptions linked to authority records without a "Standardized form(s) of name according to other rules" entry in the Identify Area (ISAAR 5.1.4)

Search for reference codes


The following ElasticSearch queries can be used to check consistency of reference codes. They are especially useful to maintain control over non-standard reference codes for small fonds boxes, oversize boxes, etc.

Search queryPurposeExpected results
referenceCode:"Box PB"Finds all archival descriptions with a "PB Box" reference code but have been incorrectly called "Box PB"Zero results.
referenceCode:"OS"

referenceCode:"Oversize"Finds all archival descriptions with oversize boxes or oversize folders.
referenceCode:"Box SF"Finds all archival descriptions with an "SF Box" reference code but have been incorrectly called "Box SF"Zero results

Search for data in the wrong field


The following expert queries are provided as examples. They represent some, but not all, expert searches that can help organize editing and quality control activities.

Search queryPurposeExpected results

Advanced search for i18n.en.scopeAndContent:"cm" in any field AND !_exists_:i18n.en.extentAndMedium in any field

Finds all archival descriptions that are missing a Physical Description note and also have the term "cm" in the Scope and Content note (i.e., the physical description information was erroneously added to the wrong RAD field).Zero results. 
i18n.en.scopeAndContent:"cabinet"Finds all archival descriptions with the term "cabinet" in the Scope and Content note.