本文整理汇总了Java中org.apache.solr.search.SolrIndexSearcher.GET_DOCSET属性的典型用法代码示例。如果您正苦于以下问题:Java SolrIndexSearcher.GET_DOCSET属性的具体用法?Java SolrIndexSearcher.GET_DOCSET怎么用?Java SolrIndexSearcher.GET_DOCSET使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.solr.search.SolrIndexSearcher
的用法示例。
在下文中一共展示了SolrIndexSearcher.GET_DOCSET属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: constructRequest
/**
* {@inheritDoc}
*/
@Override
public ShardRequest[] constructRequest(ResponseBuilder rb) {
// If we have a group.query we need to query all shards... Or we move this to the group first phase queries
boolean containsGroupByQuery = rb.getGroupingSpec().getQueries().length > 0;
// TODO: If groups.truncate=true we only have to query the specific shards even faceting and statistics are enabled
if ((rb.getQueryCommand().getFlags() & SolrIndexSearcher.GET_DOCSET) != 0 || containsGroupByQuery) {
// In case we need more results such as faceting and statistics we have to query all shards
return createRequestForAllShards(rb);
} else {
// In case we only need top groups we only have to query the shards that contain these groups.
return createRequestForSpecificShards(rb);
}
}
示例2: setQueryCommand
public Builder setQueryCommand(SolrIndexSearcher.QueryCommand queryCommand) {
this.queryCommand = queryCommand;
this.needDocSet = (queryCommand.getFlags() & SolrIndexSearcher.GET_DOCSET) != 0;
return this;
}