...
View file |
---|
name | announcementMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | announcementtypeMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | courseMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | historyMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | locationMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | metricsMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | orgMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | telemetryMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | usercoursesMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | userMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | usernotesMapping.json |
---|
height | 250 |
---|
|
View file |
---|
name | userprofilevisibilityMapping.json |
---|
height | 250 |
---|
|
Problem Statement
How to manage the mapping of indexes?
Solution Approach
The mapping can be stored in database and can be updated and invoked through API. Whenever someone invokes an API for updating mapping, it is first stored in DB and then makes an internal call to Elasticsearch to update mapping.
Table structure
column | type | description |
---|
index | text | name of the index, partition key |
type | text | the type for which the mapping should be applied, primary key |
version | int | part of primary key, can be used for auditing or getting current mapping |
mapping | text | the json of mapping called |
failure | text | any failure which occurred while calling update mapping |
createdBy | text | userId of person who called update mapping API |
createdDate | timestamp | when the API was invoked to update mapping |