Examples of fetchSource()


Examples of org.elasticsearch.search.builder.SearchSourceBuilder.fetchSource()

        FetchSourceContext fetchSourceContext = FetchSourceContext.parseFromRestRequest(request);
        if (fetchSourceContext != null) {
            if (searchSourceBuilder == null) {
                searchSourceBuilder = new SearchSourceBuilder();
            }
            searchSourceBuilder.fetchSource(fetchSourceContext);
        }

        if (request.hasParam("track_scores")) {
            if (searchSourceBuilder == null) {
                searchSourceBuilder = new SearchSourceBuilder();
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

            assertThat(item.index(), is("test"));
            assertThat(item.type(), is("type"));
            FetchSourceContext fetchSource = item.fetchSourceContext();
            switch (item.id()) {
                case "1" :
                    assertThat(fetchSource.fetchSource(), is(false));
                    break;
                case "2" :
                    assertThat(fetchSource.fetchSource(), is(true));
                    assertThat(fetchSource.includes(), is(new String[]{"field3", "field4"}));
                    break;
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

            switch (item.id()) {
                case "1" :
                    assertThat(fetchSource.fetchSource(), is(false));
                    break;
                case "2" :
                    assertThat(fetchSource.fetchSource(), is(true));
                    assertThat(fetchSource.includes(), is(new String[]{"field3", "field4"}));
                    break;
                case "3" :
                    assertThat(fetchSource.fetchSource(), is(true));
                    assertThat(fetchSource.includes(), is(new String[]{"user"}));
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

                case "2" :
                    assertThat(fetchSource.fetchSource(), is(true));
                    assertThat(fetchSource.includes(), is(new String[]{"field3", "field4"}));
                    break;
                case "3" :
                    assertThat(fetchSource.fetchSource(), is(true));
                    assertThat(fetchSource.includes(), is(new String[]{"user"}));
                    assertThat(fetchSource.excludes(), is(new String[]{"user.location"}));
                    break;
                default:
                    fail("item with id: " + item.id() + " is not 1, 2 or 3");
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

        FetchSourceContext context = request.fetchSourceContext();
        if (context == null) {
            request.fetchSourceContext(new FetchSourceContext(fetch));
        }
        else {
            context.fetchSource(fetch);
        }
        return this;
    }

    /**
 
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

        FetchSourceContext context = request.fetchSourceContext();
        if (context == null) {
            request.fetchSourceContext(new FetchSourceContext(includes, excludes));
        }
        else {
            context.fetchSource(true);
            context.includes(includes);
            context.excludes(excludes);
        }
        return this;
    }
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

        FetchSourceContext context = request.fetchSourceContext();
        if (context == null) {
            request.fetchSourceContext(new FetchSourceContext(includes, excludes));
        }
        else {
            context.fetchSource(true);
            context.includes(includes);
            context.excludes(excludes);
        }
        return this;
    }
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

            if (this.fetchSourceContext() != null) {
                FetchSourceContext source = this.fetchSourceContext();
                String[] includes = source.includes();
                String[] excludes = source.excludes();
                if (includes.length == 0 && excludes.length == 0) {
                    builder.field("_source", source.fetchSource());
                } else if (includes.length > 0 && excludes.length == 0) {
                    builder.array("_source", source.includes());
                } else if (excludes.length > 0) {
                    builder.startObject("_source");
                    if (includes.length > 0) {
View Full Code Here

Examples of org.elasticsearch.search.fetch.source.FetchSourceContext.fetchSource()

        FetchSourceContext context = request.fetchSourceContext();
        if (context == null) {
            request.fetchSourceContext(new FetchSourceContext(fetch));
        }
        else {
            context.fetchSource(fetch);
        }
        return this;
    }

    /**
 
View Full Code Here

Examples of org.rhq.core.domain.criteria.EventCriteria.fetchSource()

                break;
            default:
                // no default
                break;
            }
            criteria.fetchSource(true);

            return criteria;
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.