Thanks all. I'm using the Java API to create indexes, and I provide the settings, analysis, and mappings at that time. This is with CreateIndexRequest and calling setSource() with everything, and explicitly calling setMappings() to ensure it takes the mappings.
There's no errors, and the index appears fine. I suspect thought that it's not taking my analysis config because when I call the settings REST api below to see my analyzers, it's not there.
Going to look at the Java code further. Maybe I need to make another API call to set the analyzers. Would like to avoid that though so that I only need to make a single call to create an index with all its configuration.
On Jul 11, 2013, at 12:05 AM, Alexander Reelsen alr@spinscale.de wrote:
Hey,
The settings API returns the analyzer configuration:
curl -XPUT 'localhost:9200/myindex' -d '{
"analysis" : {
"analyzer":{
"content":{
"type":"custom",
"tokenizer":"whitespace"
}
}
}
}'
curl -X GET 'localhost:9200/myindex/_settings'
{"myindex":{"settings":{"index.analysis.analyzer.content.type":"custom","index.analysis.analyzer.content.tokenizer":"whitespace","index.number_of_shards":"5","index.number_of_replicas":"1","index.version.created":"900299"}}}
Regarding your second question, see Elasticsearch Platform — Find real-time answers at scale | Elastic (end of the document) - however I am not sure if this works on the top of my head - need to check.
--Alex
On Wed, Jul 10, 2013 at 11:58 PM, vinh vinh@loggly.com wrote:
Also, is there a REST API to set analyzers to an existing index?
On Jul 10, 2013, at 2:47 PM, vinh vinh@loggly.com wrote:
Is there a REST API to get the analyzer configuration for a given index? The _setting API doesn't appear to return this info.
Thanks,
-Vinh
--
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.
--
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.
--
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.