Also rename epochStart/epochEnd to start/end in BucketsQueryBuilder
Original commit: elastic/x-pack-elasticsearch@e2eaca7ba5
This commit is contained in:
parent
d0c0e6904e
commit
75c36207b4
|
@ -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)
|
||||
|
|
|
@ -91,7 +91,7 @@ public final class BucketsQueryBuilder {
|
|||
/**
|
||||
* If startTime <= 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 <= 0 the parameter is not set
|
||||
*/
|
||||
public BucketsQueryBuilder epochEnd(String endTime) {
|
||||
public BucketsQueryBuilder end(String endTime) {
|
||||
bucketsQuery.end = endTime;
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue