Skip to content

Commit

Permalink
Update index versions and normalizer in OpenSearch libs (#1921)
Browse files Browse the repository at this point in the history
  • Loading branch information
skwowet authored Dec 1, 2023
1 parent 42d756c commit 8654a72
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions services/libs/opensearch/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export enum OpenSearchIndex {
// Keeps track of version numbers for all OpenSearch indexes, aiding in managing documents.
// for eg: members_v1, activities_v1, etc.
export const IndexVersions = new Map<OpenSearchIndex, number>()
IndexVersions.set(OpenSearchIndex.MEMBERS, 2)
IndexVersions.set(OpenSearchIndex.ACTIVITIES, 2)
IndexVersions.set(OpenSearchIndex.ORGANIZATIONS, 2)
IndexVersions.set(OpenSearchIndex.MEMBERS, 3)
IndexVersions.set(OpenSearchIndex.ACTIVITIES, 3)
IndexVersions.set(OpenSearchIndex.ORGANIZATIONS, 3)

const prefixedMapping = {
dynamic_templates: [
Expand Down Expand Up @@ -64,6 +64,7 @@ const prefixedMapping = {
path_match: '.*',
mapping: {
type: 'keyword',
normalizer: 'lowercase_normalizer',
},
},
},
Expand Down Expand Up @@ -585,6 +586,12 @@ const prefixedSettings = {
filter: ['lowercase'],
},
},
normalizer: {
lowercase_normalizer: {
type: 'custom',
filter: ['lowercase'],
},
},
},
}

Expand Down

0 comments on commit 8654a72

Please sign in to comment.