Sono in esecuzione il seguente comando nel prompt di Windows:di Windows: ricciolo con i dati JSON sulla riga di comando
curl -XPUT http://127.0.0.1:9200/test-index/test-type/_mapping?pretty=true -d '{"test-type": {"properties": {"name": {"index": "analyzed", "term_vector": "with_positions_offsets", "boost": 1.0, "store": "yes", "type": "string"}}}}'
ottengo il seguente errore:
{
"error" : "ElasticsearchParseException[Failed to parse content to map]; nested: JsonParseException[Unexpected character (''' (code 39)): expected a
valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [email protected]5
4ed1d2; line: 1, column: 2]]; ",
"status" : 400
}
ho cercato soluzioni e hanno trovato alternative come mettere dati json nei file, ma non posso usarlo per qualche motivo.
Grazie!
provare a usare "" 'e sfuggire a quelli interni con' \ "'. –
@ DanielA.White Questa dovrebbe essere una risposta. Con Windows, questo è un must –
@ DanielA.White, che funziona! Potresti postarlo come risposta? – curious1