GetMapping using Java API


(plaflamme) #1

Hi,

How do I invoke GetMapping using the Java client? I tried the GetRequest
(using "_mapping" as the document ID), but that seems to be for getting
documents only.

I've successfully made a PutMapping request and added some stuff in "_meta".
Now I need to read it back...

Thanks,
Philippe


(Shay Banon) #2

There isn't an explicit GetMapping API, it uses the Java cluster state API. See here: https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java.
On Wednesday, May 11, 2011 at 5:54 PM, Philippe Laflamme wrote:

Hi,

How do I invoke GetMapping using the Java client? I tried the GetRequest (using "_mapping" as the document ID), but that seems to be for getting documents only.

I've successfully made a PutMapping request and added some stuff in "_meta". Now I need to read it back...

Thanks,
Philippe


(plaflamme) #3

Got it, thanks.

On Wed, May 11, 2011 at 12:58, Shay Banon shay.banon@elasticsearch.comwrote:

There isn't an explicit GetMapping API, it uses the Java cluster state
API. See here:
https://github.com/elasticsearch/elasticsearch/blob/master/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/indices/mapping/get/RestGetMappingAction.java
.

On Wednesday, May 11, 2011 at 5:54 PM, Philippe Laflamme wrote:

Hi,

How do I invoke GetMapping using the Java client? I tried the GetRequest
(using "_mapping" as the document ID), but that seems to be for getting
documents only.

I've successfully made a PutMapping request and added some stuff in
"_meta". Now I need to read it back...

Thanks,
Philippe


(system) #4