Examples of searchType()


Examples of com.opengamma.core.config.Config.searchType()

    for (Class<?> configClass : configClasses) {
      Annotation annotation = configClass.getAnnotation(Config.class);
      if (annotation instanceof Config) {
        Config configValueAnnotation = (Config) annotation;
        // extract config type
        Class<?> configType = configValueAnnotation.searchType();
        if (configType == Object.class) {
          configType = configClass;
        }
        // extract description
        String description = configValueAnnotation.description();
View Full Code Here

Examples of org.elasticsearch.action.mlt.MoreLikeThisRequest.searchType()

            mltRequest.maxDocFreq(request.paramAsInt("max_doc_freq", -1));
            mltRequest.minWordLen(request.paramAsInt("min_word_len", -1));
            mltRequest.maxWordLen(request.paramAsInt("max_word_len", -1));
            mltRequest.boostTerms(request.paramAsFloat("boost_terms", -1));

            mltRequest.searchType(SearchType.fromString(request.param("search_type")));
            mltRequest.searchIndices(request.paramAsStringArray("search_indices", null));
            mltRequest.searchTypes(request.paramAsStringArray("search_types", null));
            mltRequest.searchQueryHint(request.param("search_query_hint"));
            mltRequest.searchSize(request.paramAsInt("search_size", mltRequest.searchSize()));
            mltRequest.searchFrom(request.paramAsInt("search_from", mltRequest.searchFrom()));
View Full Code Here

Examples of org.elasticsearch.action.mlt.MoreLikeThisRequest.searchType()

        mltRequest.minWordLength(request.paramAsInt("min_word_len", request.paramAsInt("min_word_length", -1)));
        mltRequest.maxWordLength(request.paramAsInt("max_word_len", request.paramAsInt("max_word_length", -1)));
        mltRequest.boostTerms(request.paramAsFloat("boost_terms", -1));
        mltRequest.include(request.paramAsBoolean("include", false));

        mltRequest.searchType(SearchType.fromString(request.param("search_type")));
        mltRequest.searchIndices(request.paramAsStringArray("search_indices", null));
        mltRequest.searchTypes(request.paramAsStringArray("search_types", null));
        mltRequest.searchSize(request.paramAsInt("search_size", mltRequest.searchSize()));
        mltRequest.searchFrom(request.paramAsInt("search_from", mltRequest.searchFrom()));
        String searchScroll = request.param("search_scroll");
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.searchType()

        if (filter == null) {
            request = standardSearchRequest(query, indices, range).request();
        } else {
            request = filteredSearchRequest(query, filter, indices, range).request();
        }
        request.searchType(SearchType.COUNT);

        SearchResponse r = c.search(request).actionGet();
        return new CountResult(r.getHits().getTotalHits(), r.getTookInMillis(), r.getHits());
    }
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.searchType()

            }
        }
        // add extra source based on the request parameters
        searchRequest.extraSource(parseSearchSource(request));

        searchRequest.searchType(request.param("search_type"));

        String scroll = request.param("scroll");
        if (scroll != null) {
            searchRequest.scroll(new Scroll(parseTimeValue(scroll, null)));
        }
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.searchType()

                }
            }
        }

        searchRequest.extraSource(parseSearchSource(request));
        searchRequest.searchType(request.param("search_type"));
        searchRequest.queryCache(request.paramAsBoolean("query_cache", null));

        String scroll = request.param("scroll");
        if (scroll != null) {
            searchRequest.scroll(new Scroll(parseTimeValue(scroll, null)));
View Full Code Here

Examples of org.elasticsearch.action.search.SearchRequest.searchType()

                    SearchRequest copy = new SearchRequest();
                    if (defaultSearchRequest.indices() != null) {
                        copy.indices(defaultSearchRequest.indices());
                    }
                    copy.types(defaultSearchRequest.types());
                    copy.searchType(defaultSearchRequest.searchType());
                    copy.source(defaultSearchRequest.source(), true);
                    copy.extraSource(defaultSearchRequest.extraSource(), true);
                    copy.routing(defaultSearchRequest.routing());
                    copy.preference(defaultSearchRequest.preference());
                    competitor.settings().addSearchRequest(copy);
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.searchType()

        }
    }

    public QuerySearchResult executeScan(InternalSearchRequest request) throws ElasticSearchException {
        SearchContext context = createContext(request);
        assert context.searchType() == SearchType.SCAN;
        context.searchType(SearchType.COUNT); // move to COUNT, and then, when scrolling, move to SCAN
        activeContexts.put(context.id(), context);
        assert context.searchType() == SearchType.COUNT;
        try {
            if (context.scroll() == null) {
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.searchType()

    }

    public QuerySearchResult executeScan(InternalSearchRequest request) throws ElasticSearchException {
        SearchContext context = createContext(request);
        assert context.searchType() == SearchType.SCAN;
        context.searchType(SearchType.COUNT); // move to COUNT, and then, when scrolling, move to SCAN
        activeContexts.put(context.id(), context);
        assert context.searchType() == SearchType.COUNT;
        try {
            if (context.scroll() == null) {
                throw new ElasticSearchException("Scroll must be provided when scanning...");
View Full Code Here

Examples of org.elasticsearch.search.internal.SearchContext.searchType()

    public QuerySearchResult executeScan(InternalSearchRequest request) throws ElasticSearchException {
        SearchContext context = createContext(request);
        assert context.searchType() == SearchType.SCAN;
        context.searchType(SearchType.COUNT); // move to COUNT, and then, when scrolling, move to SCAN
        activeContexts.put(context.id(), context);
        assert context.searchType() == SearchType.COUNT;
        try {
            if (context.scroll() == null) {
                throw new ElasticSearchException("Scroll must be provided when scanning...");
            }
            contextProcessing(context);
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.