Skip to content

Instantly share code, notes, and snippets.

@rsimon
Created November 27, 2015 07:51
Show Gist options
  • Save rsimon/cd6b26b4ffb1f399c76c to your computer and use it in GitHub Desktop.
Save rsimon/cd6b26b4ffb1f399c76c to your computer and use it in GitHub Desktop.
ElasticSearch Mapping for Pelagios 'Common Object Properties'
{
"object": {
"properties": {
"identifier": { "type": "string", "index": "not_analyzed" },
"object_type": { "type": "string", "index": "not_analyzed" },
"title": { "type": "string" },
"description": { "type": "string" },
"homepage": { "type": "string", "index": "no" },
"is_in_dataset": {
"type": "nested",
"properties": {
"identifier": { "type": "string", "index": "not_analyzed" },
"title": { "type": "string", "index": "no" }
}
},
"language": { "type": "string", "index": "not_analyzed" },
"is_part_of": { "type": "string", "index": "not_analyzed" },
"names": {
"type": "nested",
"properties": {
"label": { "type": "string" },
"language": { "type": "string", "index": "not_analyzed" }
}
},
"places": { "type": "string", "index": "not_analyzed" },
"geometry": { "type": "geo_shape", "tree": "quadtree", "precision": "50m" },
"geometry_series": {
"type": "nested",
"index": "no",
"properties": {
"geometry": { "type": "geo_shape", "tree": "quadtree", "precision": "50m" },
"when": {
"type": "nested",
"properties": {
"from": { "type": "date", "format": "basic_date_time_no_millis" },
"to": { "type": "date", "format": "basic_date_time_no_millis" }
}
}
}
},
"temporal_bounds": {
"type": "nested",
"properties": {
"from": { "type": "date", "format": "basic_date_time_no_millis" },
"to": { "type": "date", "format": "basic_date_time_no_millis" }
}
},
"depictions": {
"type": "nested",
"properties": {
"url": { "type": "string", "index": "not_analyzed" },
"caption": { "type": "string" },
"license": { "type": "string", "index": "no" },
"creator": { "type": "string" }
}
},
"fulltext": { "type": "string" },
"close_match": { "type": "string", "index": "not_analyzed" },
"exact_match": { "type": "string", "index": "not_analyzed" },
"is_conflation_of": { "type": "object", "index": "no" }
}
}
}
@rsimon
Copy link
Author

rsimon commented Nov 27, 2015

Also see https://gist.github.com/rsimon/c79ac219abf312f23ef1 for the schema mapping for annotations (the finer-granular ojects inside items).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment