Bonjour
J'aimerais changer la valeur de _id par une valeur d'un champ lorsque je creer un document.
J'ai essaye avec cette page : https://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-id-field.html mais sans succes... j'aimerais utiliser la methode Path
Voici mon code json:
{  
     "document":{
	 "_id" : {
            "path" : "Service-Card.Service-Name",
	        "index" : "not_analyzed",
            "store" : true
        },
      	    "properties":{ 
                      "Service-Card":{"type":"object",
		 	       "properties":{
                                  "ID":{"type":"string"},
                                  "Service-Name":{"type":"string"},
                                  "LiveWebUrl":{"type":"string"},
                                  "Categories":{"type":"nested",
                                      "properties":{
                                           "Selection":{"type" : "string"}
				             }
                        },
                    "Staff":{"type":"nested",
                        "properties":{
                            "Responsible":{"type" : "string"},
                            "Developers" : {"type" : "string"},
                            "Users":{"type": "string"}
                            }
			},	
                     "RSS":{"type":"nested",
                        "properties":{
                            "JiraRRS":{"type" : "string"},
                            "LiveStatusRSS": {"type" : "string"}
                            }
			    }	
                   }
	          }
        }
    }
}
Voici l'exemple pour creer un document:
{ "index" : { "_index" : "myindex", "_type" : "document" } }
{"ID":"T4" ,"Service-Name":"Test4","LiveWebUrl":"http://test4.ch" ,"Categories": {"Selection":"Cat4"},"Staff":{"Responsible":"Admin4","Developers":"Test4IT","User":"Ice"},"RSS":{"JiraRSS": "http://test4.ch/jirarss","LiveStatusRSS":"http://test4.ch/LiveRSS"}}
Lorsque je creer le document l' _id est genere aleatoirement or je voudrais que l _id du document prenne la valeur de Service-Name, une idee ?
J'utilise Advenced Rest Client (un module google chrome ) pour gerer tout ca.
Merci d'avance!
