Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for setTrackTotalHits (0.14 sec)

  1. fess-crawler-opensearch/src/main/java/org/codelibs/fess/crawler/service/impl/AbstractCrawlerService.java

        public int getCount(final Consumer<SearchRequestBuilder> callback) {
            final TotalHits totalHits = getClient().get(c -> {
                final SearchRequestBuilder builder = c.prepareSearch(index).setSize(0).setTrackTotalHits(true);
                callback.accept(builder);
                return builder.execute();
            }).getHits().getTotalHits();
            return totalHits != null ? (int) totalHits.value : 0;
        }
    
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Nov 07 04:44:10 UTC 2024
    - 23.6K bytes
    - Viewed (0)
Back to top