@Override
    protected void processFields(final List<FieldValue> fieldValues) {
        final IndexDocument document = new IndexDocument();
        for (final FieldValue fieldValue : fieldValues) {
            final IndexField indexField = fieldValue.field();
            foundFields.add(indexField);
            if (foundFields.size() > 10_000) {
                flushFields();
            }

            if (indexField.isIndexed() || indexField.isStored()) {
                // Set the current event time if this is a recognised event time field.
                if (currentEventTime == null && indexField.getFldName().equals(index.getTimeField())) {
                    currentEventTime = fieldValue.value().toLong();
                }

                // Output some debug.
                if (LOGGER.isDebugEnabled()) {
                    debugBuffer.append("processIndexContent() - Adding to index indexName=");
                    debugBuffer.append(indexRef.getName());
                    debugBuffer.append(" name=");
                    debugBuffer.append(fieldValue.field().getFldName());
                    debugBuffer.append(" value=");
                    debugBuffer.append(fieldValue.value());

                    final String debug = debugBuffer.toString();
                    debugBuffer.clear();

                    LOGGER.debug(debug);
                }

                document.add(fieldValue);
            }
        }

        if (!document.getValues().isEmpty()) {
            try {
                Partition partition = defaultPartition;
                if (currentEventTime != null) {
                    final Entry<Long, TimePartition> entry = timePartitionTreeMap.floorEntry(currentEventTime);
                    if (entry != null &&
                            entry.getValue().getPartitionFromTime() <= currentEventTime &&
                            entry.getValue().getPartitionToTime() > currentEventTime) {
                        partition = entry.getValue();

                    } else {
                        final TimePartition timePartition = timePartitionFactory.create(index, currentEventTime);
                        timePartitionTreeMap.put(timePartition.getPartitionFromTime(), timePartition);
                        partition = timePartition;
                    }
                }

                final IndexShardKey indexShardKey =
                        indexShardKeyMap.computeIfAbsent(partition, k -> IndexShardKey.createKey(index, k));

                indexer.addDocument(indexShardKey, document);
            } catch (final RuntimeException e) {
                log(Severity.FATAL_ERROR, e.getMessage(), e);
                // Terminate processing as this is a fatal error.
                throw LoggedException.wrap(e);
            }
        }
    }
Sets the locator to use when reporting errors.

@param locator The locator to use.
stroom-index/stroom-index-impl/src/main/java/stroom/index/impl/DynamicIndexingFilter.java