Skip to content

Commit 5eb8edc

Browse files
Update field mapping for 'rights.description' to index values as keywords
Why these changes are being introduced: * This change is required in order to perform aggregations on the 'description' property of the 'rights' field. More specifically, this work is to enable filtering based on "Access to files" and support the updates to the TIMDEX data model in the PR: MITLibraries/transmogrifier#114 How this addresses that need: * Update config to convert 'rights.description' to a multifield that indexes the value as a "keyword" in a similarly named subfield (i.e., 'description.keyword') Side effects of this change: * None Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/GDT-138
1 parent 5d98197 commit 5eb8edc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ OPENSEARCH_REQUEST_TIMEOUT=
115115
# The ingest process logs the # of records indexed every nth record. Set this env variable to any integer to change the frequency of logging status updates. Can be useful for development/debugging. Defaults to 1000 if not set.
116116
STATUS_UPDATE_INTERVAL=
117117

118-
# If using a local Docker OpenSearch instance, this isn't needed. Otherwise set to OpenSearch instance endpoint without the http schem (e.g., "search-timdex-env-1234567890.us-east-1.es.amazonaws.com"). Can also be passed directly to the CLI via the `--url` option.
118+
# If using a local Docker OpenSearch instance, this isn't needed. Otherwise set to OpenSearch instance endpoint without the http scheme (e.g., "search-timdex-env-1234567890.us-east-1.es.amazonaws.com"). Can also be passed directly to the CLI via the `--url` option.
119119
TIMDEX_OPENSEARCH_ENDPOINT=
120120

121121
# If set to a valid Sentry DSN, enables Sentry exception monitoring This is not needed for local development.

config/opensearch_mappings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@
339339
"type": "nested",
340340
"properties": {
341341
"description": {
342-
"type": "text"
342+
"type": "text",
343+
"fields": {
344+
"keyword": {
345+
"type": "keyword"
346+
}
347+
}
343348
},
344349
"kind": {
345350
"type": "keyword",

0 commit comments

Comments
 (0)