mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-24 22:09:24 +00:00
Use the new ML state index name (.ml-state-000001) instead of the legacy one (.ml-state) (#54070) (#54085)
This commit is contained in:
parent
3234b50e95
commit
7e25563303
@ -904,7 +904,7 @@ public class MachineLearningIT extends ESRestHighLevelClientTestCase {
|
||||
{
|
||||
// Index a randomly named unused state document
|
||||
String docId = "non_existing_job_" + randomFrom("model_state_1234567#1", "quantiles", "categorizer_state#1");
|
||||
IndexRequest indexRequest = new IndexRequest(".ml-state").id(docId);
|
||||
IndexRequest indexRequest = new IndexRequest(".ml-state-000001").id(docId);
|
||||
indexRequest.source(Collections.emptyMap(), XContentType.JSON);
|
||||
indexRequest.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
|
||||
highLevelClient().index(indexRequest, RequestOptions.DEFAULT);
|
||||
@ -974,8 +974,8 @@ public class MachineLearningIT extends ESRestHighLevelClientTestCase {
|
||||
assertTrue(forecastExists(jobId, forecastId));
|
||||
|
||||
{
|
||||
// Verify .ml-state contains the expected unused state document
|
||||
Iterable<SearchHit> hits = searchAll(".ml-state");
|
||||
// Verify .ml-state* contains the expected unused state document
|
||||
Iterable<SearchHit> hits = searchAll(".ml-state*");
|
||||
List<SearchHit> target = new ArrayList<>();
|
||||
hits.forEach(target::add);
|
||||
long numMatches = target.stream()
|
||||
@ -1004,8 +1004,8 @@ public class MachineLearningIT extends ESRestHighLevelClientTestCase {
|
||||
assertFalse(forecastExists(jobId, forecastId));
|
||||
|
||||
{
|
||||
// Verify .ml-state doesn't contain unused state documents
|
||||
Iterable<SearchHit> hits = searchAll(".ml-state");
|
||||
// Verify .ml-state* doesn't contain unused state documents
|
||||
Iterable<SearchHit> hits = searchAll(".ml-state*");
|
||||
List<SearchHit> hitList = new ArrayList<>();
|
||||
hits.forEach(hitList::add);
|
||||
long numMatches = hitList.stream()
|
||||
|
Loading…
x
Reference in New Issue
Block a user