private FSDirectoryCrawler.CRAWL_ORDER getCrawlOrder(String s) {
        if (s == null || s.isBlank() || s.equals("os")) {
            return FSDirectoryCrawler.CRAWL_ORDER.OS_ORDER;
        } else if (s
                .toLowerCase(Locale.ROOT)
                .contains("rand")) {
            return FSDirectoryCrawler.CRAWL_ORDER.RANDOM;
        } else if (s
                .toLowerCase(Locale.ROOT)
                .contains("sort")) {
            return FSDirectoryCrawler.CRAWL_ORDER.SORTED;
        } else {
            return FSDirectoryCrawler.CRAWL_ORDER.OS_ORDER;
        }
    }
Builds either an FSDirectoryCrawler or an FSListCrawler.
tika-batch/src/main/java/org/apache/tika/batch/fs/builders/FSCrawlerBuilder.java