Search in sources :

Example 1 with StoredFieldsShardRequestFactory

use of org.apache.solr.search.grouping.distributed.requestfactory.StoredFieldsShardRequestFactory in project lucene-solr by apache.

the class QueryComponent method groupedDistributedProcess.

protected int groupedDistributedProcess(ResponseBuilder rb) {
    int nextStage = ResponseBuilder.STAGE_DONE;
    ShardRequestFactory shardRequestFactory = null;
    if (rb.stage < ResponseBuilder.STAGE_PARSE_QUERY) {
        nextStage = ResponseBuilder.STAGE_PARSE_QUERY;
    } else if (rb.stage == ResponseBuilder.STAGE_PARSE_QUERY) {
        createDistributedStats(rb);
        nextStage = ResponseBuilder.STAGE_TOP_GROUPS;
    } else if (rb.stage < ResponseBuilder.STAGE_TOP_GROUPS) {
        nextStage = ResponseBuilder.STAGE_TOP_GROUPS;
    } else if (rb.stage == ResponseBuilder.STAGE_TOP_GROUPS) {
        shardRequestFactory = new SearchGroupsRequestFactory();
        nextStage = ResponseBuilder.STAGE_EXECUTE_QUERY;
    } else if (rb.stage < ResponseBuilder.STAGE_EXECUTE_QUERY) {
        nextStage = ResponseBuilder.STAGE_EXECUTE_QUERY;
    } else if (rb.stage == ResponseBuilder.STAGE_EXECUTE_QUERY) {
        shardRequestFactory = new TopGroupsShardRequestFactory();
        nextStage = ResponseBuilder.STAGE_GET_FIELDS;
    } else if (rb.stage < ResponseBuilder.STAGE_GET_FIELDS) {
        nextStage = ResponseBuilder.STAGE_GET_FIELDS;
    } else if (rb.stage == ResponseBuilder.STAGE_GET_FIELDS) {
        shardRequestFactory = new StoredFieldsShardRequestFactory();
        nextStage = ResponseBuilder.STAGE_DONE;
    }
    if (shardRequestFactory != null) {
        for (ShardRequest shardRequest : shardRequestFactory.constructRequest(rb)) {
            rb.addRequest(this, shardRequest);
        }
    }
    return nextStage;
}
Also used : StoredFieldsShardRequestFactory(org.apache.solr.search.grouping.distributed.requestfactory.StoredFieldsShardRequestFactory) TopGroupsShardRequestFactory(org.apache.solr.search.grouping.distributed.requestfactory.TopGroupsShardRequestFactory) ShardRequestFactory(org.apache.solr.search.grouping.distributed.ShardRequestFactory) SearchGroupsRequestFactory(org.apache.solr.search.grouping.distributed.requestfactory.SearchGroupsRequestFactory) StoredFieldsShardRequestFactory(org.apache.solr.search.grouping.distributed.requestfactory.StoredFieldsShardRequestFactory) TopGroupsShardRequestFactory(org.apache.solr.search.grouping.distributed.requestfactory.TopGroupsShardRequestFactory)

Aggregations

ShardRequestFactory (org.apache.solr.search.grouping.distributed.ShardRequestFactory)1 SearchGroupsRequestFactory (org.apache.solr.search.grouping.distributed.requestfactory.SearchGroupsRequestFactory)1 StoredFieldsShardRequestFactory (org.apache.solr.search.grouping.distributed.requestfactory.StoredFieldsShardRequestFactory)1 TopGroupsShardRequestFactory (org.apache.solr.search.grouping.distributed.requestfactory.TopGroupsShardRequestFactory)1