PutMappingRequestBuilder

So that means this API should not be used?
I would rather not have to deal with building JSON and let the API do
it.
This hides any changes to the Elasticsearch low level protocol away
from my code.

On Nov 11, 1:58 pm, maverick mauricio.alar...@gmail.com wrote:

Why don't you use the provided
org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder() class
and build the json source mapping based on

Elasticsearch Platform — Find real-time answers at scale | Elastic...

Take a look tohttps://github.com/elasticsearch/elasticsearch/blob/master/modules/te...

lines 67-70

I'm doing via

client.admin()
.indices()
.putMapping(Requests.putMappingRequest(indexName)
.source(mappingSource)
.type(type)

On Nov 11, 10:30 am, Ronak Patel ronak2...@gmail.com wrote:

Hello,

I'm trying to register a GeoPoint type with an embedded Elasticsearch
node and am wondering what the correct API usage is.

I understand I have to use the PutMappingRequestBuilder...but what do
I use for the source Map? It lacks generics and as such, I'm confused
what I should add there.

final PutMappingRequestBuilder mappingRequestBuilder = new
PutMappingRequestBuilder(this.searchService.admin().indices());

Thanks,

Ronak Patel