瀏覽代碼

fix javadoc of SearchRequestBuilder#setTrackTotalHits (#42219)

Jim Ferenczi 6 年之前
父節點
當前提交
7df025ce86
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java

+ 4 - 2
server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java

@@ -378,7 +378,9 @@ public class SearchRequestBuilder extends ActionRequestBuilder<SearchRequest, Se
     }
 
     /**
-     * Indicates if the total hit count for the query should be tracked. Defaults to {@code true}
+     * Indicates if the total hit count for the query should be tracked. Requests will count total hit count accurately
+     * up to 10,000 by default, see {@link #setTrackTotalHitsUpTo(int)} to change this value or set to true/false to always/never
+     * count accurately.
      */
     public SearchRequestBuilder setTrackTotalHits(boolean trackTotalHits) {
         sourceBuilder().trackTotalHits(trackTotalHits);
@@ -386,7 +388,7 @@ public class SearchRequestBuilder extends ActionRequestBuilder<SearchRequest, Se
     }
 
     /**
-     * Indicates if the total hit count for the query should be tracked. Defaults to {@code true}
+     * Indicates the total hit count that should be tracked accurately or null if the value is unset. Defaults to 10,000.
      */
     public SearchRequestBuilder setTrackTotalHitsUpTo(int trackTotalHitsUpTo) {
         sourceBuilder().trackTotalHitsUpTo(trackTotalHitsUpTo);