private void processDocument() {
        // Write the document if we have dropped out of the record element and
        // have indexed some fields.
        if (fieldsIndexed > 0) {
            docsIndexed++;
            currentDocuments.add(document);
            document = new SolrInputDocument();

            if (currentDocuments.size() > batchSize) {
                addDocuments(currentDocuments, false);
                currentDocuments = new ArrayList<>();
            }
        }
    }
Sets the locator to use when reporting errors.

@param locator The locator to use.
stroom-search/stroom-search-solr/src/main/java/stroom/search/solr/indexing/SolrIndexingFilter.java