Introduction
- Data entered into the Archives Catalogue is stored in a MySQL database that is indexed by an open-source search engine called ElasticSearch.
- Users can construct "expert" search queries to search specific fields in the ElasticSearch index and implement other search parameters not directly available via the basic search box or advanced search form.
- Editors and contributors can use ElasticSearch queries to support quality control activities. For example, ElasticSearch queries can check for the existence of mandatory data elements, such as name of repository, title, physical description, authorized form of name, etc.
- Editors and contributors can use search results as a "checklist" of records with specific errors or omissions to be corrected.
- This section of the Archives Procedure Manual provides a number of ElasticSearch queries that can support quality control, data migration, bulk updates, and other activities.
Introduction to ElasticSearch queries
Access to Memory documentation
Translatable ElasticSearch fields are prefaced with i18n.%LANG%. %LANG% is a placeholder for the two-letter ISO language code (e.g., en for English; fr for French). The interface for the Dalhousie Archives Catalogue is only available in English, so en should always be used in ElasticSearch queries that target translatable fields.
The following table describes the basic structure of ElasticSearch queries.
Search query | Description | Example |
---|---|---|
fieldName:searchterm | Search for keyword in a given field. | Search for reference codes with the term "oversize" in the code: referenceCode:oversize |
fieldName:"search term" | Search for phrase in a given field. | Search for reference codes with the phrase "SF Box" in the code: referenceCode:"SF Box" |
i18n.%LANG%.fieldName:searchterm | Search for keyword in a translatable field. | Search physical condition notes for the term "foxing": i18n.en.physicalCharacteristics:foxing |
i18n.%LANG%.fieldName:"search term" | Search for phrase in a translatable field. | Search scope and content notes for the phrase "climate change": i18n.en.scopeAndContent:"climate change" |
_exists_:fieldName | Search for all archival descriptions with data in a given field. | Find all archival descriptions with a general material description: _exists_:materialTypeId |
!_exists_:fieldName | Search for all archival descriptions with no data in a given field. | Find all archival descriptions without a physical description: !_exists_:i18n.en.extentAndMedium |
_exists_:i18n.%LANG%.fieldName | Search for all archival descriptions with data in a translatable field. | Find all archival descriptions with a "Restrictions on access" note: _exists_:i18n.en.accessConditions |
!_exists_:i18n.%LANG%.fieldName | Search for all archival descriptions with no data in a translatable field. | Find all archival descriptions that do not have a physical description note: !_exists_:i18n.en.extentAndMedium |
List of ElasticSearch archival description fields
The following table describes the ElasticSearch archival description fields. References to RAD are provided where applicable.
ElasticSearch field | Notes | RAD element |
---|---|---|
slug | Part of the URL | N/A |
identifier | ||
transcript | The full-text from OCR'd PDFs | |
digitalObject.filename | ||
digitalObject.thumbnailPath | ||
alternativeIdentifiers.label | ||
alternativeIdentifiers.identifier | ||
referenceCode | ||
i18n.%LANG%.title | ||
i18n.%LANG%.alternateTitle | ||
i18n.%LANG%.edition | ||
i18n.%LANG%.extentAndMedium | ||
i18n.%LANG%.archivalHistory | ||
i18n.%LANG%.acquisition | ||
i18n.%LANG%.scopeAndContent | ||
i18n.%LANG%.appraisal | ||
i18n.%LANG%.accruals | ||
i18n.%LANG%.arrangement | ||
i18n.%LANG%.accessConditions | ||
i18n.%LANG%.reproductionConditions | ||
i18n.%LANG%.physicalCharacteristics | ||
i18n.%LANG%.findingAids | ||
i18n.%LANG%.locationOfOriginals | ||
i18n.%LANG%.locationOfCopies | ||
i18n.%LANG%.relatedUnitsOfDescription | ||
i18n.%LANG%.institutionResponsibleIdentifier | ||
i18n.%LANG%.rules | ||
i18n.%LANG%.sources | ||
i18n.%LANG%.revisionHistory |
generalNotes.i18n.%LANG%.content
alphaNumericNotes.i18n.%LANG%.content
conservationNotes.i18n.%LANG%.content
physicalDescriptionNotes.i18n.%LANG%.content
continuationOfTitleNotes.i18n.%LANG%.content
dates.startDateString
dates.endDateString
dates.i18n.%LANG%.name
dates.i18n.%LANG%.description
dates.i18n.%LANG%.date
aip.partOf.i18n.%LANG%.title
aip.type.slug
aip.type.i18n.%LANG%.name
physicalObjects.i18n.%LANG%.name
physicalObjects.i18n.%LANG%.description
physicalObjects.i18n.%LANG%.location
titleStatementOfResponsibility.i18n.%LANG%.value