Package org.elasticsearch.index.mapper.object.RootObjectMapper

Examples of org.elasticsearch.index.mapper.object.RootObjectMapper.Builder


  @Override
  public final MappingSource getMappingSource() {
    try {
      if (_mapping == null) {
        Builder mapperBuilder = new RootObjectMapper.Builder(getTypeAlias());

        buildMapping(mapperBuilder);

        XContentBuilder contentBuilder = JsonXContent.contentBuilder();

        contentBuilder.startObject();
        mapperBuilder.build(new BuilderContext(null, new ContentPath())).toXContent(contentBuilder, null);
        contentBuilder.endObject();

        // cache mapping as string for easy debugging
        _mapping = contentBuilder.string();
      }
View Full Code Here


  @Override
  public final MappingSource getMappingSource() {
    try {
      if (_mapping == null || isDynamicMapping()) {
        Builder mapperBuilder = new RootObjectMapper.Builder(getTypeAlias());

        buildMapping(mapperBuilder);

        XContentBuilder contentBuilder = JsonXContent.contentBuilder();

        contentBuilder.startObject();
        mapperBuilder.build(new BuilderContext(null, new ContentPath())).toXContent(contentBuilder, null,
            new ToXContent() {

              @Override
              public XContentBuilder toXContent(XContentBuilder builder, Params params)
                  throws IOException {
View Full Code Here

  @Override
  public final MappingSource getMappingSource() {
    try {
      if (_mapping == null || isDynamicMapping()) {
        Builder mapperBuilder = new RootObjectMapper.Builder(getTypeAlias());

        buildMapping(mapperBuilder);

        XContentBuilder contentBuilder = JsonXContent.contentBuilder();

        contentBuilder.startObject();
        mapperBuilder.build(new BuilderContext(null, new ContentPath())).toXContent(contentBuilder,
            EMPTY_PARAMS, new ToXContent() {

              @Override
              public XContentBuilder toXContent(XContentBuilder builder, Params params)
                  throws IOException {
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.mapper.object.RootObjectMapper.Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.