Skip to content

Conversation

chrisparrinello
Copy link
Contributor

The query phase of a DFS search runs in a separate implementation. This change adds a new metric es.search_response.took_durations.dfs_query.histogram to measure that.

@elasticsearchmachine elasticsearchmachine added v9.3.0 needs:triage Requires assignment of a team area label labels Oct 13, 2025
@chrisparrinello chrisparrinello added >enhancement Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch :Search Foundations/Search Catch all for Search Foundations and removed needs:triage Requires assignment of a team area label labels Oct 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@elasticsearchmachine
Copy link
Collaborator

Hi @chrisparrinello, I've created a changelog YAML for you.

Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of comments, thanks!

private final Client client;
private final AbstractSearchAsyncAction<?> context;
private final SearchProgressListener progressListener;
private long phaseStartTimeInNanos;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do you set the initial value for this? I guess it's missing and tests don't catch it because we never verify that timing is sensible :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Yeah it was missed. I'll add it.

}

private void onFinish(AggregatedDfs dfs) {
context.getSearchResponseMetrics().recordSearchPhaseDuration(getName(), System.nanoTime() - phaseStartTimeInNanos);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one, shouldn't we be able to store attributes like we do at the shard level? I may have forgotten to raise this in your previous PR. perhaps a follow-up for later to do so when possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be best for a follow-up PR for later. I think the issue in some cases is having access to the SearchRequest and the list of localIndices. I think the SearchRequest object is easy to come by but the localIndices not as easy. If it is okay to pass in an empty array or null then we can take care of this sooner I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants