JDONREFv4 Mappings : Différence entre versions

De JDONREF Wiki
(Le mapping adresse)
Ligne 37 : Ligne 37 :
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"numero" : { "type" : "integer", "index":"not_analyzed"},
 
"numero" : { "type" : "integer", "index":"not_analyzed"},
 
"repetition" : { "type" : "string", "index":"not_analyzed"},
 
"repetition" : { "type" : "string", "index":"not_analyzed"},
Ligne 44 : Ligne 44 :
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
"commune" : { "type" : "string" , "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
Ligne 51 : Ligne 51 :
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"poizon_service" : { "type" : "integer", "index":"not_analyzed"},
 
"poizon_service" : { "type" : "integer", "index":"not_analyzed"},
"ligne1" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne1" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"ligne2" : { "type" : "string", "index":"no"},
 
"ligne2" : { "type" : "string", "index":"no"},
 
"ligne3" : { "type" : "string", "index":"no"},
 
"ligne3" : { "type" : "string", "index":"no"},
"ligne4" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne6" : { "type" : "string", "index": "no"},
 
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 84 : Ligne 84 :
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"numero" : { "type" : "integer", "store": true, "index":"not_analyzed"},
+
"numero" : { "type" : "integer", "index":"not_analyzed"},
 
"repetition" : { "type" : "string", "index":"not_analyzed"},
 
"repetition" : { "type" : "string", "index":"not_analyzed"},
 
"type_de_voie" : { "type" : "string", "index":"not_analyzed"},
 
"type_de_voie" : { "type" : "string", "index":"not_analyzed"},
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
"commune" : { "type" : "string" , "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
Ligne 99 : Ligne 99 :
 
"ligne2" : { "type" : "string", "index":"no"},
 
"ligne2" : { "type" : "string", "index":"no"},
 
"ligne3" : { "type" : "string", "index":"no"},
 
"ligne3" : { "type" : "string", "index":"no"},
"ligne4" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne6" : { "type" : "string", "index": "no"},
 
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 131 : Ligne 131 :
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"numero_debut" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_debut" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_fin" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_fin" : { "type" : "integer", "index":"not_analyzed"},
Ligne 140 : Ligne 140 :
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
"commune" : { "type" : "string" , "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
Ligne 146 : Ligne 146 :
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
"ligne4" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne6" : { "type" : "string", "index": "no"},
 
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 176 : Ligne 176 :
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"numero_min" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_min" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_max" : { "type" : "integer", "index":"not_analyzed"},
 
"numero_max" : { "type" : "integer", "index":"not_analyzed"},
Ligne 183 : Ligne 183 :
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"article" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
 
"libelle" : { "type" : "string", "index":"not_analyzed"},
"commune" : { "type" : "string" , "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
Ligne 189 : Ligne 189 :
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
"ligne4" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne6" : { "type" : "string", "index": "no"},
 
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 217 : Ligne 217 :
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"commune" : { "type" : "string" , "store":true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
Ligne 227 : Ligne 227 :
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne5" : { "type" : "string", "index":"no"},
 
"ligne6" : { "type" : "string", "index": "no"},
 
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 250 : Ligne 250 :
 
"properties" : {
 
"properties" : {
 
"code_departement" : { "type" : "string", "term_vector" : "with_positions_offsets", "index":"not_analyzed", "copy_to": ["codes"]},
 
"code_departement" : { "type" : "string", "term_vector" : "with_positions_offsets", "index":"not_analyzed", "copy_to": ["codes"]},
"code_pays" : { "type" : "string" , "store" : true, "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
"codes" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
"ligne6" : { "type" : "string", "store": true, "index": "no"},
+
"ligne6" : { "type" : "string", "index": "no"},
"ligne7" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {
Ligne 278 : Ligne 278 :
 
"_source": {"excludes": ["geometrie"]},
 
"_source": {"excludes": ["geometrie"]},
 
"properties" : {
 
"properties" : {
"code_pays" : { "type" : "string" , "store" : true, "term_vector" : "with_positions_offsets", "index":"not_analyzed", "similarity":"jdonrefv4"},
+
"code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"pays" : { "type" : "string" , "index": "no"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
 
"t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
"ligne7" : { "type" : "string", "store": true, "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
+
"ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
 
"geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
+
"fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
 
},
 
},
 
"transform" : {
 
"transform" : {

Version du 25 octobre 2014 à 10:26

JDONREFv4 introduit différents mapping permettant de gérer des adresses.

C'est le POI ou la Zone qui dispose de la plus grande richesse d'information, mais les autres mappings peuvent disposer d'informations qui leurs sont propres (notamment leur géométrie).

Ils sont fournis dans le plugin sous la forme de fichiers json.

Quelques informations à lire avant de commencer

Les mappings qui suivent disposent de quelques particularités à connaître pour leur bonne lecture.

  • JDONREFv4 se sert des champs stockés (store:true). Il est important de respecter le nom de ces champs si la requête est utilisée. Les autres sont aussi généralement associés à une adresse mais ne lui sont pas indispensables.
  • Le respect du type est nécessaire pour le bon usage de la requête. Ils permettent un calcul de malus suivant des règles métier associées à chaque type.
  • Le champ 'codes' est un champ calculé à partir d'autres. Il n'est donc pas nécessaire de l'alimenter en donnée, il va les piocher dans code_postal, code_departement, ... L'attribut copyTo est utilisé à cet effet.
  • Le champ 'fullName' est lui aussi calculé à partir de l'ensemble des champs indexés concernant une adresse. Il permet d'effectuer un premier niveau de filtrage rapide sur l'adresse. Il s'appuie sur l'attribut "transform" pour effectuer ce calcul.
  • La plupart des champs ne sont pas stockés dans l'index, mais peuvent toujours être obtenus au travers du champ spécial _source (hormis la géométrie). Cela permet d'alléger le poids de l'index.
  • Le champ géométrie est exclus du champ _source pour éviter de surcharger la base. Les géométries des communes sont particulièrement gourmandes. Leur géométrie n'est donc pas du tout accessible (ni même en spécifiant le champ), mais uniquement utilisée à titre de requêtage spatial (topologique). Par contre, une géométrie "pin" est conservée comme géocodage au centroïde et toujours présent dans le champ _source (et lui aussi requêtable).
  • Les champs qui sont marqués "index":"not_analyzed" peuvent être utilisés dans des requêtes avec des valeurs brutes (ils ne sont pas analyses). Cela semble pertinent pour les codes, les identifiants, tout ce qui n'est pas du langage naturel en somme. Dans un champ comme "ligne4", la distinction ne peux pas ici être réalisée.
  • Vous pouvez bien sûr ajouter autant de champs que vous le souhaitez, construire des requêtes avec, ...
Le mapping poizon

Un POIZON est un POI (point d'intérêt) ou une Zone (géographique). Leur géométrie est différente : un POI est un point, tandis qu'une zone est généralement un polygone (ou multi-polygone). Le type geo_shape est alors employé pour leur géométrie commune. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/poizon/_mapping' -d '{
    "poizon": {
       "_type": {"store": true},
       "_source": {"excludes": ["geometrie"]},
       "properties" : {
                         "poizon_id" : { "type" : "string", "index":"not_analyzed"},
                         "adr_id" : { "type" : "string", "index":"not_analyzed"},
                         "tro_id" : { "type" : "string", "index":"not_analyzed"},
                         "voi_id" : { "type" : "string", "index":"not_analyzed"},
                         "code_insee" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "numero" : { "type" : "integer", "index":"not_analyzed"},
                         "repetition" : { "type" : "string", "index":"not_analyzed"},
                         "type_de_voie" : { "type" : "string", "index":"not_analyzed"},
                         "article" : { "type" : "string", "index":"not_analyzed"},
                         "libelle" : { "type" : "string", "index":"not_analyzed"},
                         "commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "pays" : { "type" : "string" , "index": "no"},
                         "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                         "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                         "poizon_service" : { "type" : "integer", "index":"not_analyzed"},
                         "ligne1" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "ligne2" : { "type" : "string", "index":"no"},
                         "ligne3" : { "type" : "string", "index":"no"},
                         "ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "ligne5" : { "type" : "string", "index":"no"},
                         "ligne6" : { "type" : "string", "index": "no"},
                         "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                         "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                         "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
     },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; }; if ( ctx._source['code_insee']!=null) { def tokens = ctx._source['code_insee'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|7'; }; if (ctx._source['code_insee_commune']!=null) { def tokens = ctx._source['code_insee_commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|6'; }; if (ctx._source['commune']!=null) { def tokens = ctx._source['commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|5'; }; if (ctx._source['code_arrondissement']!=null) { def tokens = ctx._source['code_arrondissement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|4'; }; if (ctx._source['code_postal']!=null) { def tokens = ctx._source['code_postal'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|3'; }; if (ctx._source['numero']!=null) { ctx._source['fullName'] += ' ' + ctx._source['numero'] + '|11'; }; if (ctx._source['repetition']!=null) { def tokens = ctx._source['repetition'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|11'; }; if (ctx._source['type_de_voie']!=null) { def tokens = ctx._source['type_de_voie'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; }; if (ctx._source['article']!=null) { def tokens = ctx._source['article'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; }; if (ctx._source['libelle']!=null) { def tokens = ctx._source['libelle'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; }; if (ctx._source['ligne1']!=null) { def tokens = ctx._source['ligne1'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|1'; };"
      }
   }
 }'
Le mapping adresse

Après les type poizon, le type adresse est le plus complet. Sa géométrie est un point, mais pour des raisons pratiques, le type geo_shape est employé. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/adresse/_mapping' -d '{
    "adresse": {
       "_type": {"store": true},
       "_source": {"excludes": ["geometrie"]},
       "properties" : {
                           "adr_id" : { "type" : "string", "index":"not_analyzed"},
                           "tro_id" : { "type" : "string", "index":"not_analyzed"},
                           "voi_id" : { "type" : "string", "index":"not_analyzed"},
                           "code_insee" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "numero" : { "type" : "integer", "index":"not_analyzed"},
                           "repetition" : { "type" : "string", "index":"not_analyzed"},
                           "type_de_voie" : { "type" : "string", "index":"not_analyzed"},
                           "article" : { "type" : "string", "index":"not_analyzed"},
                           "libelle" : { "type" : "string", "index":"not_analyzed"},
                           "commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "pays" : { "type" : "string" , "index": "no"},
                           "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "ligne2" : { "type" : "string", "index":"no"},
                           "ligne3" : { "type" : "string", "index":"no"},
                           "ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "ligne5" : { "type" : "string", "index":"no"},
                           "ligne6" : { "type" : "string", "index": "no"},
                           "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                           "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                           "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                       },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; }; if ( ctx._source['code_insee']!=null) { def tokens = ctx._source['code_insee'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|7'; }; if (ctx._source['code_insee_commune']!=null) { def tokens = ctx._source['code_insee_commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|6'; }; if (ctx._source['commune']!=null) { def tokens = ctx._source['commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|5'; }; if (ctx._source['code_arrondissement']!=null) { def tokens = ctx._source['code_arrondissement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|4'; }; if (ctx._source['code_postal']!=null) { def tokens = ctx._source['code_postal'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|3'; }; if (ctx._source['numero']!=null) { ctx._source['fullName'] += ' ' + ctx._source['numero'] + '|11'; }; if (ctx._source['repetition']!=null) { def tokens = ctx._source['repetition'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|11'; }; if (ctx._source['type_de_voie']!=null) { def tokens = ctx._source['type_de_voie'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; }; if (ctx._source['article']!=null) { def tokens = ctx._source['article'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; }; if (ctx._source['libelle']!=null) { def tokens = ctx._source['libelle'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; };"
      }
   }
 }'
Le mapping troncon

Le mapping troncon correspond à une portion de voie. Sa géométrie est une linestring. Il dispose de bornes de début et de fin. Mais contrairement à la base de donnée PostgreSQL de JDONREF, il n'a pas de bornes pour chaque coté du troncon (2 troncons sont créés). Il n'est pas utilisé par la requête mais pourrait l'être ultérieurement pour fournir une interpolation métrique du géocodage. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/troncon/_mapping' -d '{
    "troncon": {
       "_type": {"store": true},
       "_source": {"excludes": ["geometrie"]},
       "properties" : {
                           "tro_id" : { "type" : "string", "index":"not_analyzed"},
                           "voi_id" : { "type" : "string", "index":"not_analyzed"},
                           "code_insee" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "numero_debut" : { "type" : "integer", "index":"not_analyzed"},
                           "numero_fin" : { "type" : "integer", "index":"not_analyzed"},
                           "repetition_debut" : { "type" : "string", "index":"not_analyzed"},
                           "repetition_fin" : { "type" : "string", "index":"not_analyzed"},
                           "type_de_voie" : { "type" : "string", "index":"not_analyzed"},
                           "article" : { "type" : "string", "index":"not_analyzed"},
                           "libelle" : { "type" : "string", "index":"not_analyzed"},
                           "commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "pays" : { "type" : "string" , "index": "no"},
                           "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "ligne5" : { "type" : "string",  "index":"no"},
                           "ligne6" : { "type" : "string", "index": "no"},
                           "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                           "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                           "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                       },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; }; if ( ctx._source['code_insee']!=null) { def tokens = ctx._source['code_insee'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|7'; }; if (ctx._source['code_insee_commune']!=null) { def tokens = ctx._source['code_insee_commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|6'; }; if (ctx._source['commune']!=null) { def tokens = ctx._source['commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|5'; }; if (ctx._source['code_arrondissement']!=null) { def tokens = ctx._source['code_arrondissement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|4'; }; if (ctx._source['code_postal']!=null) { def tokens = ctx._source['code_postal'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|3'; };  if (ctx._source['ligne4']!=null) { def tokens = ctx._source['ligne4'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; };"
      }
   }
 }'
Le mapping voie

Le mapping voie correspond à une adresse sans numéro. Sa géométrie est une linestring (en attendant l'implémentation du multilinestring par elasticsearch). Elle dispose d'un numéro de début et de fin. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/voie/_mapping' -d '{
    "voie": {
       "_type": {"store": true},
      "_source": {"excludes": ["geometrie"]},
      "properties" : {
                           "voi_id" : { "type" : "string", "index":"not_analyzed"},
                           "code_insee" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "numero_min" : { "type" : "integer", "index":"not_analyzed"},
                           "numero_max" : { "type" : "integer", "index":"not_analyzed"},
                           "type_de_voie" : { "type" : "string", "index":"not_analyzed"},
                           "article" : { "type" : "string", "index":"not_analyzed"},
                           "libelle" : { "type" : "string", "index":"not_analyzed"},
                           "commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
                           "code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes","fullName"]},
                           "pays" : { "type" : "string" , "index": "no"},
                           "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "ligne4" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "ligne5" : { "type" : "string",  "index":"no"},
                           "ligne6" : { "type" : "string", "index": "no"},
                           "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                           "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                           "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                       },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; }; if ( ctx._source['code_insee']!=null) { def tokens = ctx._source['code_insee'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|7'; }; if (ctx._source['code_insee_commune']!=null) { def tokens = ctx._source['code_insee_commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|6'; }; if (ctx._source['commune']!=null) { def tokens = ctx._source['commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|5'; }; if (ctx._source['code_arrondissement']!=null) { def tokens = ctx._source['code_arrondissement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|4'; }; if (ctx._source['code_postal']!=null) { def tokens = ctx._source['code_postal'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|3'; };  if (ctx._source['ligne4']!=null) { def tokens = ctx._source['ligne4'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|2'; };"
      }
  }
}'
Le mapping commune

Le mapping commune a pour géométrie un multipolygon, sans extrusion. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/commune/_mapping' -d '{
    "commune": {
       "_type": {"store": true},
       "_source": {"excludes": ["geometrie"]},
       "properties" : {     
                         "code_insee" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_departement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_insee_commune" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "commune" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "code_arrondissement" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "code_postal" : { "type" : "string", "index":"not_analyzed", "copy_to": ["codes"]},
                         "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "pays" : { "type" : "string" , "index": "no"},
                         "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                         "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                         "ligne5" : { "type" : "string", "index":"no"},
                         "ligne6" : { "type" : "string", "index": "no"},
                         "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                         "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                         "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                         "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                       },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; }; if ( ctx._source['code_insee']!=null) { def tokens = ctx._source['code_insee'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|7'; }; if (ctx._source['code_insee_commune']!=null) { def tokens = ctx._source['code_insee_commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|6'; }; if (ctx._source['commune']!=null) { def tokens = ctx._source['commune'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|5'; }; if (ctx._source['code_arrondissement']!=null) { def tokens = ctx._source['code_arrondissement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|4'; }; if (ctx._source['code_postal']!=null) { def tokens = ctx._source['code_postal'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|3'; };"
      }
   }
 }'
Le mapping departement

Le mapping commune a pour géométrie un multipolygon, sans extrusion. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/departement/_mapping' -d '{
    "departement": {
       "_type": {"store": true},
       "_source": {"excludes": ["geometrie"]},
       "properties" : {
                           "code_departement" : { "type" : "string", "term_vector" : "with_positions_offsets", "index":"not_analyzed", "copy_to": ["codes"]},
                           "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "codes" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pays" : { "type" : "string" , "index": "no"},
                           "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "ligne6" : { "type" : "string", "index": "no"},
                           "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                           "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                           "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                       },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; }; if (ctx._source['code_departement']!=null) { def tokens = ctx._source['code_departement'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|8'; };"
      }
   }
 }'
Le mapping pays

Le mapping pays a pour géométrie un multipolygon, sans extrusion. Son mapping est défini de la manière suivante :

 $ curl -XPUT 'http://localhost:9200/jdonref/pays/_mapping' -d '{
    "pays": {
       "_type": {"store": true},
      "_source": {"excludes": ["geometrie"]},
      "properties" : { 
                           "code_pays" : { "type" : "string" , "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_codes_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pays" : { "type" : "string" , "index": "no"},
                           "t0" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "t1" : { "type" : "date", "format": "YYYY-MM-dd HH:mm:ss", "index":"not_analyzed"},
                           "ligne7" : { "type" : "string", "term_vector" : "with_positions_offsets", "index_analyzer":"jdonrefv4_index","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"},
                           "pin" : { "properties" : { "centroide" : { "type" : "geo_point" , "fielddata" : { "format" : "compressed" , "precision" : "1cm"}}}},
                           "geometrie" : { "type" : "geo_shape", "precision": "1cm", "tree": "quadtree"},
                           "fullName" : {"type": "string", "term_vector" : "with_positions_offsets_payloads", "index_analyzer":"jdonrefv4_index_token_count","search_analyzer":"jdonrefv4_search", "similarity":"jdonrefv4"}
                      },
      "transform" : {
          "lang" : "groovy",
          "script" : "ctx._source['fullName'] = ; if (ctx._source['ligne7']!=null) { def tokens = ctx._source['ligne7'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|9'; }; if (ctx._source['code_pays']!=null) { def tokens = ctx._source['code_pays'].split(' '); for(x in tokens) ctx._source['fullName'] += ' ' + x + '|10'; };"
      }
  }
 }'