@Override
    public Result search(Query query, Execution execution) {
        // Determine if we should remove duplicates
        String unique = query.properties().getString(PARAM_UNIQUE);
        if (unique == null || unique.trim().isEmpty()) {
            return execution.search(query);
        }
        query.trace("Performing deduping by attribute '" + unique + "'.", true, 3);
        return dedupe(query, execution, unique);
    }
Implements the deprecated "unique" api for deduplication by using grouping. We create a grouping expression on
the field we wish to dedup on (which must be an attribute).
Total hits is calculated using the new count unique groups functionality.
container-search/src/main/java/com/yahoo/search/grouping/UniqueGroupingSearcher.java