ML: changing JobResultsProvider.getForecastRequestStats to support > 1 index#37157
Merged
benwtrent merged 2 commits intoelastic:masterfrom Jan 7, 2019
Merged
Conversation
…re than one index
Collaborator
|
Pinging @elastic/ml-core |
Member
Author
|
run gradle build tests 1 |
davidkyle
reviewed
Jan 7, 2019
| .execute().actionGet(); | ||
| SearchResponse searchResponse = client().prepareSearch(AnomalyDetectorsIndex.jobResultsAliasedName(jobId)) | ||
| .setQuery(new BoolQueryBuilder() | ||
| .filter(new TermQueryBuilder("_id", ForecastRequestStats.documentId(jobId, forecastId)))) |
Member
There was a problem hiding this comment.
You could use an IdsQueryBuilder instead of the TermQueryBuilder and drop the BoolQueryBuilder
| SearchRequestBuilder forecastSearch = client.prepareSearch(indexName) | ||
| .setTypes(ElasticsearchMappings.DOC_TYPE) | ||
| .setQuery(new BoolQueryBuilder() | ||
| .filter(new TermQueryBuilder("_id", |
Member
Author
|
run gradle build tests 1 |
1 similar comment
Member
Author
|
run gradle build tests 1 |
benwtrent
added a commit
that referenced
this pull request
Jan 7, 2019
…1 index (#37157) * ML: changing JobResultsProvider.getForecastRequestStats to support more than one index * moving to use idsQuery()
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Jan 7, 2019
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocker for #36643
This is the only place where I could find us using a
GetRequestagainst the results indices. Once we help users migrate the results indices, there will be more than one index behind the job aliased index.