Merge branch 'master' into feature/aggs_2_0

# Conflicts:
#	src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java
This commit is contained in:
Colin Goodheart-Smithe 2015-04-29 16:32:05 +01:00
commit 0589adb8b4
1 changed files with 12 additions and 42 deletions

View File

@ -315,7 +315,7 @@ public class SearchSourceBuilder implements ToXContent {
* An optional terminate_after to terminate the search after collecting
* <code>terminateAfter</code> documents
*/
public SearchSourceBuilder terminateAfter(int terminateAfter) {
public SearchSourceBuilder terminateAfter(int terminateAfter) {
if (terminateAfter <= 0) {
throw new IllegalArgumentException("terminateAfter must be > 0");
}
@ -918,34 +918,4 @@ public class SearchSourceBuilder implements ToXContent {
return params;
}
}
private static class PartialField {
private final String name;
private final String[] includes;
private final String[] excludes;
private PartialField(String name, String[] includes, String[] excludes) {
this.name = name;
this.includes = includes;
this.excludes = excludes;
}
private PartialField(String name, String include, String exclude) {
this.name = name;
this.includes = include == null ? null : new String[] { include };
this.excludes = exclude == null ? null : new String[] { exclude };
}
public String name() {
return name;
}
public String[] includes() {
return includes;
}
public String[] excludes() {
return excludes;
}
}
}