private int getCollapseSize(Properties properties, String fieldName, int globalCollapseSize) {
        Integer fieldCollapseSize = properties.getInteger(collapseSize.append(fieldName));
        return fieldCollapseSize != null ? fieldCollapseSize : globalCollapseSize;
    }
Collapse logic. Preserves only maxHitsPerField hits
for each unique value of the collapsing parameters.
Uses collapsefields sequentially.
container-search/src/main/java/com/yahoo/prelude/searcher/FieldCollapsingSearcher.java