.endObject().copiedBytes());
analyzer = (FieldNameAnalyzer) doc.analyzer();
assertThat(((NamedAnalyzer) analyzer.defaultAnalyzer()).name(), equalTo("whitespace"));
assertThat(((NamedAnalyzer) analyzer.analyzers().get("field1")), nullValue());
assertThat(((NamedAnalyzer) analyzer.analyzers().get("field2")).name(), equalTo("simple"));
}
@Test public void testAnalyzerMappingNotIndexedNorStored() throws Exception {
String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
.startObject("_analyzer").field("path", "field_analyzer").endObject()