-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ML: changing JobResultsProvider.getForecastRequestStats to support > 1 index #37157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ML: changing JobResultsProvider.getForecastRequestStats to support > 1 index #37157
Conversation
…re than one index
Pinging @elastic/ml-core |
run gradle build tests 1 |
.execute().actionGet(); | ||
SearchResponse searchResponse = client().prepareSearch(AnomalyDetectorsIndex.jobResultsAliasedName(jobId)) | ||
.setQuery(new BoolQueryBuilder() | ||
.filter(new TermQueryBuilder("_id", ForecastRequestStats.documentId(jobId, forecastId)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use an IdsQueryBuilder
instead of the TermQueryBuilder
and drop the BoolQueryBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidkyle TIL :D.
SearchRequestBuilder forecastSearch = client.prepareSearch(indexName) | ||
.setTypes(ElasticsearchMappings.DOC_TYPE) | ||
.setQuery(new BoolQueryBuilder() | ||
.filter(new TermQueryBuilder("_id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
run gradle build tests 1 |
1 similar comment
run gradle build tests 1 |
…1 index (#37157) * ML: changing JobResultsProvider.getForecastRequestStats to support more than one index * moving to use idsQuery()
…piration * elastic/master: Removing unused methods in Numbers (elastic#37186) Fix setting by time unit (elastic#37192) [DOCS] Cleans up xpackml attributes ML: fix delayed data annotations on secured cluster (elastic#37193) Update version in SearchRequest and related test [DOCS] Adds overview and API ref for cluster voting configurations (elastic#36954) ML: changing JobResultsProvider.getForecastRequestStats to support > 1 index (elastic#37157) Separate out validation of groups of settings (elastic#34184)
Blocker for #36643
This is the only place where I could find us using a
GetRequest
against the results indices. Once we help users migrate the results indices, there will be more than one index behind the job aliased index.