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 query | Purpose | Expected results |
---|---|---|
publicationStatusId:159 | Find all draft archival descriptions | Variable, should match the number of draft descriptions identified in the "available drafts" notification that appears after logging in. |
publicationStatusId:160 | Find all published archival descriptions | Variable, 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 query | Purpose | Expected results |
---|---|---|
createdAt:[YYYY-MM-DD TO YYYY-MM-DD] | Find all archival descriptions created between the dates provided in the query | Variable |
updatedAt:[YYYY-MM-DD TO YYYY-MM-DD] | Find all archival descriptions last modified between the dates provided in the query | Variable |
createdAt:[* TO YYYY-MM-DD] | Find all archival descriptions created before the date provided in the query | Variable |
updatedAt:[* TO YYYY-MM-DD] | Find all archival descriptions modified before the date provided in the query | Variable |
createdAt:[YYYY-MM-DD TO *] | Find all archival descriptions created after the date provided in the query | Variable |
updatedAt:[YYYY-MM-DD TO *] | Find all archival descriptions modified after the date provided in the query | Variable |
Search for missing or existing data in the archival description
Use the following ElasticSearch queries to find draft or published archival descriptions.
Search query | Purpose | Expected results |
---|---|---|
!_exists_:repository.i18n.en.authorizedFormOfName | Find archival descriptions without a repository | Zero results |
_exists_:i18n.en.title | Find archival descriptions with mandatory title | All archival descriptions |
!_exists_:i18n.en.title | Find archival descriptions without mandatory title | Zero results |
_exists_:alternateTitle | Find all archival descriptions with an alternate title | N/A |
!_exists_:alternateTitle | Find all archival descriptions without an alternate title | N/A |
!_exists_:materialTypeId | Find archival descriptions without a general material designation (GMD) note | Zero results |
_exists_:materialTypeId | Find archival descriptions with a general material designation (GMD) note | All archival descriptions |
_exists_:i18n.en.archivalHistory | Find archival descriptions with custodial history note. Combine with "top-level descriptions" radio button in advanced search | All top-level archival descriptions |
!_exists_:i18n.en.archivalHistory | Find archival descriptions without custodial history note. Combine with "top-level descriptions" radio button in advanced search | Zero results |
_exists_:i18n.en.scopeAndContent | Find archival descriptions with scope and content note | |
!_exists_:i18n.en.scopeAndContent | Find archival descriptions without a scope and content note | |
!_exists_:i18n.en.scopeAndContent AND hasDigitalObject:1 | Find archival descriptions without a scope and content note AND includes a digital object | Zero results |
_exists_:i18n.en.scopeAndContent AND hasDigitalObject:1 | Find archival descriptions with a scope and content note AND a digital object | All archival descriptions with digital objects |
_exists_:i18n.en.extentAndMedium | Find all archival descriptions with a physical description | All archival descriptions |
!_exists_:i18n.en.extentAndMedium | Find all archival descriptions without a physical description | Zero results |
!_exists_:i18n.en.accessConditions | Find 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.accessConditions | Find archival descriptions with restrictions on access notes. Combine with "top-level descriptions" radio button in advanced search. | Zero results |
_exists_:subjects.i18n.en.name | Find archival descriptions linked to subject headings | |
!_exists_:subjects.i18n.en.name | Find 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 query | Purpose | Expected results |
---|---|---|
_exists_:creators.i18n.en.authorizedFormOfName | Find archival descriptions linked to authority records | Variable |
!_exists_:creators.i18n.en.authorizedFormOfName | Find archival descriptions that are not linked to authority records | Variable |
_exists_:creators.otherNames.i18n.en.name | Find 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.name | Find 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.name | Find 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.name | Find 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.name | Find 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 query | Purpose | Expected results |
---|---|---|
_exists_:names.i18n.en.authorizedFormOfName | Find archival descriptions linked to authority records | Variable |
!_exists_:names.i18n.en.authorizedFormOfName | Find archival descriptions that are not linked to authority records | Variable |
_exists_names.otherNames.i18n.en.name | Find 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.name | Find 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.name | Find 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.name | Find 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.name | Find 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 query | Purpose | Expected 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 query | Purpose | Expected 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. |