private static RollUpBitMask buildRollUpBitMaskFromCriteria(final FindEventCriteria criteria,
                                                                final StatisticStoreDoc statisticsDataSource) {
        final Set<String> rolledUpTagsFound = criteria.getRolledUpFieldNames();

        final RollUpBitMask result;

        if (rolledUpTagsFound.size() > 0) {
            final List<Integer> rollUpTagPositionList = new ArrayList<>();

            for (final String tag : rolledUpTagsFound) {
                final Integer position = statisticsDataSource.getPositionInFieldList(tag);
                if (position == null) {
                    throw new RuntimeException(String.format("No field position found for tag %s", tag));
                }
                rollUpTagPositionList.add(position);
            }
            result = RollUpBitMask.fromTagPositions(rollUpTagPositionList);

        } else {
            result = RollUpBitMask.ZERO_MASK;
        }
        return result;
    }
TODO: This is a bit simplistic as a user could create a filter that said
user=user1 AND user='*' which makes no sense. At the moment we would
assume that the user tag is being rolled up so user=user1 would never be
found in the data and thus would return no data.
stroom-statistics/stroom-statistics-impl-sql/src/main/java/stroom/statistics/impl/sql/search/StatisticsSearchServiceImpl.java