Also rename epochStart/epochEnd to start/end in BucketsQueryBuilder

Original commit: elastic/x-pack-elasticsearch@e2eaca7ba5
This commit is contained in:
Dimitrios Athanasiou 2016-11-29 21:46:23 +00:00 committed by Dimitris Athanasiou
parent d0c0e6904e
commit 75c36207b4
3 changed files with 14 additions and 14 deletions

View File

@ -387,8 +387,8 @@ public class GetBucketsAction extends Action<GetBucketsAction.Request, GetBucket
BucketsQueryBuilder.BucketsQuery query =
new BucketsQueryBuilder().expand(request.expand)
.includeInterim(request.includeInterim)
.epochStart(request.start)
.epochEnd(request.end)
.start(request.start)
.end(request.end)
.from(request.pageParams.getFrom())
.size(request.pageParams.getSize())
.anomalyScoreThreshold(request.anomalyScore)

View File

@ -91,7 +91,7 @@ public final class BucketsQueryBuilder {
/**
* If startTime &lt;= 0 the parameter is not set
*/
public BucketsQueryBuilder epochStart(String startTime) {
public BucketsQueryBuilder start(String startTime) {
bucketsQuery.start = startTime;
return this;
}
@ -99,7 +99,7 @@ public final class BucketsQueryBuilder {
/**
* If endTime &lt;= 0 the parameter is not set
*/
public BucketsQueryBuilder epochEnd(String endTime) {
public BucketsQueryBuilder end(String endTime) {
bucketsQuery.end = endTime;
return this;
}

View File

@ -32,8 +32,8 @@ public class BucketsQueryBuilderTests extends ESTestCase {
.expand(true)
.anomalyScoreThreshold(50.0d)
.normalizedProbabilityThreshold(70.0d)
.epochStart("1000")
.epochEnd("2000")
.start("1000")
.end("2000")
.partitionValue("foo")
.sortField("anomalyScore")
.sortDescending(true)
@ -60,8 +60,8 @@ public class BucketsQueryBuilderTests extends ESTestCase {
.expand(true)
.anomalyScoreThreshold(50.0d)
.normalizedProbabilityThreshold(70.0d)
.epochStart("1000")
.epochEnd("2000")
.start("1000")
.end("2000")
.partitionValue("foo");
BucketsQueryBuilder query2 = new BucketsQueryBuilder()
@ -71,8 +71,8 @@ public class BucketsQueryBuilderTests extends ESTestCase {
.expand(true)
.anomalyScoreThreshold(50.0d)
.normalizedProbabilityThreshold(70.0d)
.epochStart("1000")
.epochEnd("2000")
.start("1000")
.end("2000")
.partitionValue("foo");
assertEquals(query.build(), query2.build());
@ -86,8 +86,8 @@ public class BucketsQueryBuilderTests extends ESTestCase {
.expand(true)
.anomalyScoreThreshold(50.0d)
.normalizedProbabilityThreshold(70.0d)
.epochStart("1000")
.epochEnd("2000")
.start("1000")
.end("2000")
.partitionValue("foo");
assertEquals(query.build(), query2.build());
@ -98,8 +98,8 @@ public class BucketsQueryBuilderTests extends ESTestCase {
.expand(true)
.anomalyScoreThreshold(50.1d)
.normalizedProbabilityThreshold(70.0d)
.epochStart("1000")
.epochEnd("2000")
.start("1000")
.end("2000")
.partitionValue("foo");
assertFalse(query.build().equals(query2.build()));
}