Hi there,
I am dealing with the Java API and have a problem getting a Date object
back.
For the index /employees/employee I have a mapping for the employed_since
field like:
"employed_since": {
"type": "date",
"format": "dateOptionalTime"
}
The document has of course some more fields
With the Java-API I created a node and I'll issue a:
GetResponse object = client.prepareGet("employees", "employee",
"SOME_ID").setFields("employed_since", "name", "first_name", "gender"
).execute().actionGet();
When I now try to access object.getField("employed_since").getValue() I
receive the String representation of the Date object.
of course I could parse the string, but what is the best practice here? How
do I get the Date object back without having to parse it?
Thanks for any help!
Jan
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.