@Test void testCreateMappingKeywordCaseSensitive() throws IOException { Mapping mapping = createMapping( FieldMapping.builder() .setName("field") .setType(MappingType.KEYWORD) .setCaseSensitive(true) .build()); XContentBuilder xContentBuilder = mappingContentBuilder.createMapping(mapping); assertEquals(JSON_KEYWORD_CASE_SENSITIVE, xContentBuilder.string()); }
XContentBuilder createMapping(Mapping mapping) { try (XContentBuilder contentBuilder = XContentFactory.contentBuilder(xContentType)) { createMapping(mapping, contentBuilder); return contentBuilder; } catch (IOException e) { throw new UncheckedIOException(e); } }
MappingContentBuilder { XContentBuilder createMapping(Mapping mapping) { try (XContentBuilder contentBuilder = XContentFactory.contentBuilder(xContentType)) { createMapping(mapping, contentBuilder); return contentBuilder; } catch (IOException e) { throw new UncheckedIOException(e); } } }
MappingContentBuilder { XContentBuilder createMapping(Mapping mapping) { try (XContentBuilder contentBuilder = XContentFactory.contentBuilder(xContentType)) { createMapping(mapping, contentBuilder); return contentBuilder; } catch (IOException e) { throw new UncheckedIOException(e); } } MappingContentBuilder();   MappingContentBuilder(XContentType xContentType); }
MappingContentBuilder { XContentBuilder createMapping(Mapping mapping) { try (XContentBuilder contentBuilder = XContentFactory.contentBuilder(xContentType)) { createMapping(mapping, contentBuilder); return contentBuilder; } catch (IOException e) { throw new UncheckedIOException(e); } } MappingContentBuilder();   MappingContentBuilder(XContentType xContentType);  }
MappingContentBuilder { XContentBuilder createMapping(Mapping mapping) { try (XContentBuilder contentBuilder = XContentFactory.contentBuilder(xContentType)) { createMapping(mapping, contentBuilder); return contentBuilder; } catch (IOException e) { throw new UncheckedIOException(e); } } MappingContentBuilder();   MappingContentBuilder(XContentType xContentType);  static final String KEYWORD_TYPE; static final String FIELDS; static final String TYPE; static final String INDEX; }