Updated index settings and mappings
authorThierry Florac <thierry.florac@onf.fr>
Mon, 17 Sep 2018 16:25:40 +0200
changeset 81 6c2715230d09
parent 80 f691b998d91d
child 82 d5be3c4ef997
Updated index settings and mappings
docs/mappings/index-settings.json
docs/mappings/mappings/WfBlogPost.json
docs/mappings/mappings/WfNewsEvent.json
docs/mappings/mappings/WfReport.json
docs/mappings/mappings/WfTopic.json
--- a/docs/mappings/index-settings.json	Mon Sep 17 16:14:56 2018 +0200
+++ b/docs/mappings/index-settings.json	Mon Sep 17 16:25:40 2018 +0200
@@ -1,5 +1,9 @@
 {
 	"settings": {
+		"index": {
+			"number_of_shards": 1,
+			"number_of_replicas": 1
+		},
 		"analysis": {
 			"tokenizer": {
 				"nGram": {
@@ -51,8 +55,7 @@
 						"lowercase",
 						"snowball_fr",
 						"elision_fr",
-						"stemmer_fr",
-						"word_delimiter"
+						"stemmer_fr"
 					]
 				},
 				"french_search": {
@@ -64,11 +67,252 @@
 						"lowercase",
 						"snowball_fr",
 						"elision_fr",
-						"stemmer_fr",
-						"word_delimiter"
+						"stemmer_fr"
 					]
 				}
 			}
 		}
+	},
+	"mappings": {
+		"_default_": {
+			"properties": {
+				"internal_id": {
+					"type": "keyword"
+				},
+				"content_type": {
+					"type": "keyword"
+				},
+				"title": {
+					"type": "object",
+					"properties": {
+						"en": {
+							"type": "text"
+						},
+						"fr": {
+							"type": "text",
+							"analyzer": "french",
+							"search_analyzer": "french_search"
+						}
+					}
+				},
+				"short_name": {
+					"type": "object",
+					"properties": {
+						"en": {
+							"type": "text"
+						},
+						"fr": {
+							"type": "text",
+							"analyzer": "french",
+							"search_analyzer": "french_search"
+						}
+					}
+				},
+				"description": {
+					"type": "object",
+					"properties": {
+						"en": {
+							"type": "text"
+						},
+						"fr": {
+							"type": "text",
+							"analyzer": "french",
+							"search_analyzer": "french_search"
+						}
+					}
+				},
+				"body": {
+					"type": "object",
+					"properties": {
+						"en": {
+							"type": "text"
+						},
+						"fr": {
+							"type": "text",
+							"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": "text"
+								},
+								"fr": {
+									"type": "text",
+									"analyzer": "french",
+									"search_analyzer": "french_search"
+								}
+							}
+						},
+						"description": {
+							"type": "object",
+							"properties": {
+								"en": {
+									"type": "text"
+								},
+								"fr": {
+									"type": "text",
+									"analyzer": "french",
+									"search_analyzer": "french_search"
+								}
+							}
+						}
+					}
+				},
+				"gallery": {
+					"type": "object",
+					"properties": {
+						"title": {
+							"type": "object",
+							"properties": {
+								"en": {
+									"type": "text"
+								},
+								"fr": {
+									"type": "text",
+									"analyzer": "french",
+									"search_analyzer": "french_search"
+								}
+							}
+						},
+						"description": {
+							"type": "object",
+							"properties": {
+								"en": {
+									"type": "text"
+								},
+								"fr": {
+									"type": "text",
+									"analyzer": "french",
+									"search_analyzer": "french_search"
+								}
+							}
+						}
+					}
+				},
+				"location": {
+					"type": "object",
+					"properties": {
+						"coords": {
+							"type": "geo_point"
+						},
+						"forests": {
+							"type": "keyword"
+						},
+						"cities": {
+							"type": "keyword"
+						},
+						"departments": {
+							"type": "keyword"
+						},
+						"countries": {
+							"type": "keyword"
+						},
+						"structures": {
+							"type": "keyword"
+						}
+					}
+				},
+				"hearing": {
+					"type": "object",
+					"properties": {
+						"targets": {
+							"type": "keyword"
+						},
+						"national_scope": {
+							"type": "boolean"
+						},
+						"forests": {
+							"type": "keyword"
+						},
+						"cities": {
+							"type": "keyword"
+						},
+						"departments": {
+							"type": "keyword"
+						},
+						"countries": {
+							"type": "keyword"
+						},
+						"structures": {
+							"type": "keyword"
+						},
+						"source_site": {
+							"type": "keyword"
+						},
+						"diffusion_sites": {
+							"type": "keyword"
+						}
+					}
+				},
+				"tags": {
+					"type": "keyword"
+				},
+				"themes": {
+					"type": "object",
+					"properties": {
+						"terms": {
+							"type": "keyword"
+						},
+						"synonyms": {
+							"type": "keyword"
+						},
+						"parents": {
+							"type": "keyword"
+						},
+						"associations": {
+							"type": "keyword"
+						}
+					}
+				},
+				"collections": {
+					"type": "keyword"
+				}
+			}
+		}
 	}
 }
--- a/docs/mappings/mappings/WfBlogPost.json	Mon Sep 17 16:14:56 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-{
-	"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": {
-					"coords": {
-						"type": "geo_point"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					}
-				}
-			},
-			"hearing": {
-				"type": "object",
-				"properties": {
-					"targets": {
-						"type": "keyword"
-					},
-					"national_scope": {
-						"type": "boolean"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					},
-					"source_site": {
-						"type": "keyword"
-					},
-					"diffusion_sites": {
-						"type": "keyword"
-					}
-				}
-			},
-			"tags": {
-				"type": "keyword"
-			},
-			"themes": {
-				"type": "object",
-				"properties": {
-					"terms": {
-						"type": "keyword"
-					},
-					"synonyms": {
-						"type": "keyword"
-					},
-					"parents": {
-						"type": "keyword"
-					},
-					"associations": {
-						"type": "keyword"
-					}
-				}
-			},
-			"collections": {
-				"type": "keyword"
-			}
-		}
-	}
-}
--- a/docs/mappings/mappings/WfNewsEvent.json	Mon Sep 17 16:14:56 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-{
-	"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": {
-					"coords": {
-						"type": "geo_point"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					}
-				}
-			},
-			"hearing": {
-				"type": "object",
-				"properties": {
-					"targets": {
-						"type": "keyword"
-					},
-					"national_scope": {
-						"type": "boolean"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					},
-					"source_site": {
-						"type": "keyword"
-					},
-					"diffusion_sites": {
-						"type": "keyword"
-					}
-				}
-			},
-			"tags": {
-				"type": "keyword"
-			},
-			"themes": {
-				"type": "object",
-				"properties": {
-					"terms": {
-						"type": "keyword"
-					},
-					"synonyms": {
-						"type": "keyword"
-					},
-					"parents": {
-						"type": "keyword"
-					},
-					"associations": {
-						"type": "keyword"
-					}
-				}
-			},
-			"collections": {
-				"type": "keyword"
-			}
-		}
-	}
-}
--- a/docs/mappings/mappings/WfReport.json	Mon Sep 17 16:14:56 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-{
-	"WfReport": {
-		"properties": {
-			"internal_id": {
-				"type": "keyword"
-			},
-			"content_type": {
-				"type": "keyword"
-			},
-			"data_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": {
-					"coords": {
-						"type": "geo_point"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					}
-				}
-			},
-			"hearing": {
-				"type": "object",
-				"properties": {
-					"targets": {
-						"type": "keyword"
-					},
-					"national_scope": {
-						"type": "boolean"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					},
-					"source_site": {
-						"type": "keyword"
-					},
-					"diffusion_sites": {
-						"type": "keyword"
-					}
-				}
-			},
-			"tags": {
-				"type": "keyword"
-			},
-			"themes": {
-				"type": "object",
-				"properties": {
-					"terms": {
-						"type": "keyword"
-					},
-					"synonyms": {
-						"type": "keyword"
-					},
-					"parents": {
-						"type": "keyword"
-					},
-					"associations": {
-						"type": "keyword"
-					}
-				}
-			},
-			"collections": {
-				"type": "keyword"
-			}
-		}
-	}
-}
--- a/docs/mappings/mappings/WfTopic.json	Mon Sep 17 16:14:56 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-{
-	"WfTopic": {
-		"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": {
-					"coords": {
-						"type": "geo_point"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					}
-				}
-			},
-			"hearing": {
-				"type": "object",
-				"properties": {
-					"targets": {
-						"type": "keyword"
-					},
-					"national_scope": {
-						"type": "boolean"
-					},
-					"forests": {
-						"type": "keyword"
-					},
-					"cities": {
-						"type": "keyword"
-					},
-					"departments": {
-						"type": "keyword"
-					},
-					"countries": {
-						"type": "keyword"
-					},
-					"structures": {
-						"type": "keyword"
-					},
-					"source_site": {
-						"type": "keyword"
-					},
-					"diffusion_sites": {
-						"type": "keyword"
-					}
-				}
-			},
-			"tags": {
-				"type": "keyword"
-			},
-			"themes": {
-				"type": "object",
-				"properties": {
-					"terms": {
-						"type": "keyword"
-					},
-					"synonyms": {
-						"type": "keyword"
-					},
-					"parents": {
-						"type": "keyword"
-					},
-					"associations": {
-						"type": "keyword"
-					}
-				}
-			},
-			"collections": {
-				"type": "keyword"
-			}
-		}
-	}
-}