What metadata are you looking for? Just the column type? Unfortunately
there is no direct way to get the Java type of each response/field. You can
retrieve the mapping from the index [1] and determine which field uses
which type. I am assuming most using the Java API have written their own
ORM layer. Elasticsearch uses Jackson for JSON, so you can always use it to
recreate your objects.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html

Cheers,

Ivan


On Tue, Jan 14, 2014 at 8:47 AM, Savio Teles <[email protected]> wrote:

> So, Have I to extract the Java type of each object of response? There is
> no way to get metadata directly?
>
> Thanks for the answer!
>
> Em terça-feira, 14 de janeiro de 2014 12h13min44s UTC-2, Savio Teles
> escreveu:
>
>> How can I get the metadata from a query result?
>>
>> In Java can be implemented like this using SQL:
>>
>> Statement st = connection.createStatement();
>> ResultSet result = st.executeQuery(sql);
>> result.getMetaData();
>>
>  --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/233e3754-b1da-482f-8c98-b16a30a87b0b%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQD73awz3jd%2B%3Dh243%3Dnw_45rKY%3Dpi1_%2Bu-Aq-8-RF_ooyg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to