Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2011 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1026176 to your computer and use it in GitHub Desktop.
Save anonymous/1026176 to your computer and use it in GitHub Desktop.
Mapping failure
PutMappingResponse pmResponse = getNodeClient().admin().indices().preparePutMapping(indexName)
.setSource("{\n" +
" \"_default_\" : {\n" +
" \"dynamic_templates\" : [\n" +
" {\n" +
" \"index_nonanalyzed\" : {\n" +
" \"match\" : \"*\",\n" +
" \"match_mapping_type\" : \"string\",\n" +
" \"mapping\" : {\n" +
" \"index\" : \"not_analyzed\"\n" +
" }\n" +
" }\n" +
" }\n" +
" ]\n" +
" }\n" +
"}"
)
.execute().actionGet();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment