use of org.graylog2.rest.resources.search.responses.SearchDecorationStats in project graylog2-server by Graylog2.
the class DecoratorProcessorImpl method getSearchDecoratorStats.
private SearchDecorationStats getSearchDecoratorStats(List<ResultMessageSummary> decoratedMessages) {
final Set<String> addedFields = new HashSet<>();
final Set<String> changedFields = new HashSet<>();
final Set<String> removedFields = new HashSet<>();
decoratedMessages.forEach(message -> {
final DecorationStats decorationStats = message.decorationStats();
if (decorationStats != null) {
addedFields.addAll(decorationStats.addedFields().keySet());
changedFields.addAll(decorationStats.changedFields().keySet());
removedFields.addAll(decorationStats.removedFields().keySet());
}
});
return SearchDecorationStats.create(addedFields, changedFields, removedFields);
}
Aggregations