Updated Elasticsearch mappings
authorThierry Florac <thierry.florac@onf.fr>
Wed, 12 Jul 2017 12:01:24 +0200
changeset 14 b20c1022db17
parent 13 81395a2919f5
child 15 70adcc5ac29c
Updated Elasticsearch mappings
docs/mappings/attachment-pipeline.json
docs/mappings/index-settings.json
docs/mappings/mappings/WfBlogPost.json
docs/mappings/mappings/WfImageMap.json
docs/mappings/mappings/WfNewsEvent.json
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/mappings/attachment-pipeline.json	Wed Jul 12 12:01:24 2017 +0200
@@ -0,0 +1,17 @@
+{
+	"description": "Extract attachments informations",
+	"processors": [
+		{
+			"foreach": {
+				"field": "attachments",
+				"processor": {
+					"attachment": {
+						"field": "_ingest._value.content",
+						"target_field": "_ingest._value.attachment",
+						"ignore_missing": true
+					}
+				}
+			}
+		}
+	]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/mappings/index-settings.json	Wed Jul 12 12:01:24 2017 +0200
@@ -0,0 +1,74 @@
+{
+	"settings": {
+		"analysis": {
+			"tokenizer": {
+				"nGram": {
+					"type": "nGram",
+					"min_gram": 3,
+					"max_gram": 20
+				}
+			},
+			"filter": {
+				"snowball_fr": {
+					"type": "snowball",
+					"language": "French"
+				},
+				"elision_fr": {
+					"type": "elision",
+					"articles": [
+						"l",
+						"m",
+						"t",
+						"qu",
+						"n",
+						"s",
+						"j",
+						"d",
+						"c",
+						"jusqu",
+						"quoiqu",
+						"lorsqu",
+						"puisqu"
+					]
+				},
+				"stop_fr": {
+					"type": "stop",
+					"stopwords": "_french_",
+					"ignore_case": true
+				},
+				"stemmer_fr": {
+					"type": "stemmer",
+					"language": "light_french"
+				}
+			},
+			"analyzer": {
+				"french": {
+					"type": "custom",
+					"tokenizer": "nGram",
+					"filter": [
+						"stop_fr",
+						"asciifolding",
+						"lowercase",
+						"snowball_fr",
+						"elision_fr",
+						"stemmer_fr",
+						"word_delimiter"
+					]
+				},
+				"french_search": {
+					"type": "custom",
+					"tokenizer": "standard",
+					"filter": [
+						"stop_fr",
+						"asciifolding",
+						"lowercase",
+						"snowball_fr",
+						"elision_fr",
+						"stemmer_fr",
+						"word_delimiter"
+					]
+				}
+			}
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/mappings/mappings/WfBlogPost.json	Wed Jul 12 12:01:24 2017 +0200
@@ -0,0 +1,221 @@
+{
+	"WfBlogPost": {
+		"properties": {
+			"internal_id": {
+				"type": "keyword"
+			},
+			"content_type": {
+				"type": "keyword"
+			},
+			"title": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"short_name": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"description": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"body": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"keywords": {
+				"type": "keyword"
+			},
+			"workflow": {
+				"type": "object",
+				"properties": {
+					"name": {
+						"type": "keyword"
+					},
+					"date": {
+						"type": "date"
+					},
+					"status": {
+						"type": "keyword"
+					},
+					"created_date": {
+						"type": "date"
+					},
+					"modified_date": {
+						"type": "date"
+					},
+					"publication_date": {
+						"type": "date"
+					},
+					"effective_date": {
+						"type": "date"
+					},
+					"push_end_date": {
+						"type": "date"
+					},
+					"expiration_date": {
+						"type": "date"
+					},
+					"first_publication_date": {
+						"type": "date"
+					}
+				}
+			},
+			"extfile": {
+				"type": "object",
+				"properties": {
+					"title": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					},
+					"description": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					}
+				}
+			},
+			"gallery": {
+				"type": "object",
+				"properties": {
+					"title": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					},
+					"description": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					}
+				}
+			},
+			"location": {
+				"type": "object",
+				"properties": {
+					"city": {
+						"type": "string"
+					},
+					"coords": {
+						"type": "geo_point"
+					},
+					"countries": {
+						"type": "keyword"
+					},
+					"departments": {
+						"type": "keyword"
+					},
+					"forests": {
+						"type": "keyword"
+					},
+					"postal_code": {
+						"type": "keyword"
+					},
+					"structures": {
+						"type": "keyword"
+					}
+				}
+			},
+			"hearing": {
+				"type": "object",
+				"properties": {
+					"targets": {
+						"type": "keyword"
+					},
+					"source_site": {
+						"type": "keyword"
+					},
+					"diffusion_sites": {
+						"type": "keyword"
+					}
+				}
+			},
+			"themes": {
+				"type": "object",
+				"properties": {
+					"terms": {
+						"type": "keyword"
+					},
+					"synonyms": {
+						"type": "keyword"
+					},
+					"parents": {
+						"type": "keyword"
+					},
+					"associations": {
+						"type": "keyword"
+					}
+				}
+			}
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/mappings/mappings/WfImageMap.json	Wed Jul 12 12:01:24 2017 +0200
@@ -0,0 +1,102 @@
+{
+	"WfImageMap": {
+		"properties": {
+			"internal_id": {
+				"type": "keyword"
+			},
+			"content_type": {
+				"type": "keyword"
+			},
+			"title": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"short_name": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"description": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"body": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"keywords": {
+				"type": "keyword"
+			},
+			"workflow": {
+				"type": "object",
+				"properties": {
+					"name": {
+						"type": "keyword"
+					},
+					"date": {
+						"type": "date"
+					},
+					"status": {
+						"type": "keyword"
+					},
+					"created_date": {
+						"type": "date"
+					},
+					"modified_date": {
+						"type": "date"
+					},
+					"publication_date": {
+						"type": "date"
+					},
+					"effective_date": {
+						"type": "date"
+					},
+					"push_end_date": {
+						"type": "date"
+					},
+					"expiration_date": {
+						"type": "date"
+					},
+					"first_publication_date": {
+						"type": "date"
+					}
+				}
+			}
+		}
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/docs/mappings/mappings/WfNewsEvent.json	Wed Jul 12 12:01:24 2017 +0200
@@ -0,0 +1,221 @@
+{
+	"WfNewsEvent": {
+		"properties": {
+			"internal_id": {
+				"type": "keyword"
+			},
+			"content_type": {
+				"type": "keyword"
+			},
+			"title": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"short_name": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"description": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"body": {
+				"type": "object",
+				"properties": {
+					"en": {
+						"type": "string"
+					},
+					"fr": {
+						"type": "string",
+						"analyzer": "french",
+						"search_analyzer": "french_search"
+					}
+				}
+			},
+			"keywords": {
+				"type": "keyword"
+			},
+			"workflow": {
+				"type": "object",
+				"properties": {
+					"name": {
+						"type": "keyword"
+					},
+					"date": {
+						"type": "date"
+					},
+					"status": {
+						"type": "keyword"
+					},
+					"created_date": {
+						"type": "date"
+					},
+					"modified_date": {
+						"type": "date"
+					},
+					"publication_date": {
+						"type": "date"
+					},
+					"effective_date": {
+						"type": "date"
+					},
+					"push_end_date": {
+						"type": "date"
+					},
+					"expiration_date": {
+						"type": "date"
+					},
+					"first_publication_date": {
+						"type": "date"
+					}
+				}
+			},
+			"extfile": {
+				"type": "object",
+				"properties": {
+					"title": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					},
+					"description": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					}
+				}
+			},
+			"gallery": {
+				"type": "object",
+				"properties": {
+					"title": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					},
+					"description": {
+						"type": "object",
+						"properties": {
+							"en": {
+								"type": "string"
+							},
+							"fr": {
+								"type": "string",
+								"analyzer": "french",
+								"search_analyzer": "french_search"
+							}
+						}
+					}
+				}
+			},
+			"location": {
+				"type": "object",
+				"properties": {
+					"city": {
+						"type": "keyword"
+					},
+					"coords": {
+						"type": "geo_point"
+					},
+					"countries": {
+						"type": "keyword"
+					},
+					"departments": {
+						"type": "keyword"
+					},
+					"forests": {
+						"type": "keyword"
+					},
+					"postal_code": {
+						"type": "keyword"
+					},
+					"structures": {
+						"type": "keyword"
+					}
+				}
+			},
+			"hearing": {
+				"type": "object",
+				"properties": {
+					"targets": {
+						"type": "keyword"
+					},
+					"source_site": {
+						"type": "keyword"
+					},
+					"diffusion_sites": {
+						"type": "keyword"
+					}
+				}
+			},
+			"themes": {
+				"type": "object",
+				"properties": {
+					"terms": {
+						"type": "keyword"
+					},
+					"synonyms": {
+						"type": "keyword"
+					},
+					"parents": {
+						"type": "keyword"
+					},
+					"associations": {
+						"type": "keyword"
+					}
+				}
+			}
+		}
+	}
+}