Java Api for get Mapping of index or index/type


(ajasuja18) #1

Hello Everyone,

I know using curl, we can get the mapping
http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html

What is the equivalent Java api for the same? Short sample code would help

Thanks in advance..!!


(Ivan Brusic) #2

Take a look at the RestGetMappingAction class. It converts the REST
request into the Java API format and is a great example to start from.

--
Ivan

On Tue, Jul 31, 2012 at 1:29 PM, ajasuja jasuja.ankit@gmail.com wrote:

Hello Everyone,

I know using curl, we can get the mapping
http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping.html

What is the equivalent Java api for the same? Short sample code would help

Thanks in advance..!!


(system) #3