@Override
    public ResultStore createResultStore(final SearchRequest searchRequest) {
        LOGGER.debug("create called for searchRequest {} ", searchRequest);

        final DocRef docRef = Preconditions.checkNotNull(
                Preconditions.checkNotNull(
                                Preconditions.checkNotNull(searchRequest)
                                        .getQuery())
                        .getDataSource());
        Preconditions.checkNotNull(searchRequest.getResultRequests(),
                "searchRequest must have at least one resultRequest");
        Preconditions.checkArgument(!searchRequest.getResultRequests().isEmpty(),
                "searchRequest must have at least one resultRequest");

        final StatisticStoreDoc statisticStoreDoc = statisticStoreCache.getStatisticsDataSource(docRef);

        Preconditions.checkNotNull(statisticStoreDoc, "Statistic configuration could not be found for uuid "
                                                      + docRef.getUuid());

        return buildStore(searchRequest, statisticStoreDoc);
    }
Turn the {@link StatisticStoreDoc} into an {@link List<QueryField>} object
<p>
This builds the standard set of fields for a statistics store, which can
be filtered by the relevant statistics store instance
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/search/SqlStatisticSearchProvider.java