@Override
    protected void enqueue() throws InterruptedException, IOException, TimeoutException {
        String fetcherName = getFetcherName();
        String emitterName = getEmitterName();

        try (SolrClient solrClient = createSolrClient()) {
            int fileCount = 0;

            SolrQuery query = new SolrQuery();
            query.set("q", "*:*");
            query.setRows(rows);

            Set<String> allFields = new HashSet<>();
            allFields.add("id");
            allFields.add(idField);
            allFields.add(parsingIdField);
            allFields.add(failCountField);
            allFields.add(sizeFieldName);
            allFields.addAll(additionalFields);

            query.setFields(allFields.toArray(new String[]{}));
            query.setSort(SolrQuery.SortClause.asc(parsingIdField));
            query.addSort(SolrQuery.SortClause.asc("id"));
            query.setFilterQueries(filters.toArray(new String[]{}));

            HandlerConfig handlerConfig = getHandlerConfig();

            String cursorMark = CursorMarkParams.CURSOR_MARK_START;
            boolean done = false;
            while (!done) {
                query.set(CursorMarkParams.CURSOR_MARK_PARAM, cursorMark);
                QueryResponse qr = solrClient.query(solrCollection, query);
                long totalToFetch = qr
                        .getResults()
                        .getNumFound();
                String nextCursorMark = qr.getNextCursorMark();
                LOGGER.info("Query to fetch files to parse collection={}, q={}, onCount={}, totalCount={}", solrCollection, query, fileCount, totalToFetch);
                for (SolrDocument sd : qr.getResults()) {
                    ++fileCount;
                    String fetchKey = (String) sd.getFieldValue(idField);
                    String emitKey = (String) sd.getFieldValue(idField);
                    Metadata metadata = new Metadata();
                    for (String nextField : allFields) {
                        metadata.add(nextField, (String) sd.getFieldValue(nextField));
                    }
                    LOGGER.info("iterator doc: {}, idField={}, fetchKey={}", sd, idField, fetchKey);
                    ParseContext parseContext = new ParseContext();
                    parseContext.set(HandlerConfig.class, handlerConfig);
                    tryToAdd(new FetchEmitTuple(fetchKey, new FetchKey(fetcherName, fetchKey), new EmitKey(emitterName, emitKey), new Metadata(), parseContext,
                            getOnParseException()));
                }
                if (cursorMark.equals(nextCursorMark)) {
                    done = true;
                }
                cursorMark = nextCursorMark;
            }
        } catch (SolrServerException | TikaConfigException e) {
            LOGGER.error("Could not iterate through solr", e);
        }
    }
You can specify solrUrls, or you can specify solrZkHosts and use use zookeeper to determine the solr server urls.
tika-pipes/tika-pipes-iterators/tika-pipes-iterator-solr/src/main/java/org/apache/tika/pipes/pipesiterator/solr/SolrPipesIterator.java