public Iterator < Integer > searchAll ( RuleQuery query ) { SearchRequestBuilder esSearch = client . prepareSearch ( TYPE_RULE ) . setScroll ( TimeValue . timeValueMinutes ( SCROLL_TIME_IN_MINUTES ) ) ; optimizeScrollRequest ( esSearch ) ; QueryBuilder qb = buildQuery ( query ) ; Map < String , QueryBuilder > filters = buildFilters ( query ) ; BoolQueryBuilder fb = boolQuery ( ) ; for ( QueryBuilder filterBuilder : filters . values ( ) ) { fb . must ( filterBuilder ) ; } esSearch . setQuery ( boolQuery ( ) . must ( qb ) . filter ( fb ) ) ; SearchResponse response = esSearch . get ( ) ; return scrollIds ( client , response , Integer :: parseInt ) ; }
Return all rule ids matching the search query without pagination nor facets