Package org.elasticsearch.search.builder

Examples of org.elasticsearch.search.builder.SearchSourceBuilderException


    }

    @Override
    protected XContentBuilder internalXContent(XContentBuilder builder, Params params) throws IOException {
        if (filter == null) {
            throw new SearchSourceBuilderException("filter must be set on filter aggregation [" + getName() + "]");
        }
        filter.toXContent(builder, params);
        return builder;
    }
View Full Code Here


    @Override
    protected XContentBuilder internalXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        if (childType == null) {
            throw new SearchSourceBuilderException("child_type must be set on children aggregation [" + getName() + "]");
        }
        builder.field("type", childType);
        return builder.endObject();
    }
View Full Code Here

        try {
            XContentBuilder builder = XContentFactory.contentBuilder(Requests.CONTENT_TYPE);
            sourceBuilder.toXContent(builder, ToXContent.EMPTY_PARAMS);
            this.source = builder.bytes();
        } catch (Exception e) {
            throw new SearchSourceBuilderException("Failed to build search source", e);
        }
        this.unsafe = false;
        return this;
    }
View Full Code Here

        try {
            XContentBuilder builder = XContentFactory.contentBuilder(contentType);
            toXContent(builder, ToXContent.EMPTY_PARAMS);
            return builder.bytes();
        } catch (Exception e) {
            throw new SearchSourceBuilderException("Failed to build search source", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.builder.SearchSourceBuilderException

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.