Skip to content

Commit

Permalink
Add SearchResponse proto fields for matchAll
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <[email protected]>
  • Loading branch information
finnegancarroll committed Nov 22, 2024
1 parent 853b206 commit da16c66
Show file tree
Hide file tree
Showing 2 changed files with 335 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,14 @@ private PhaseTook(StreamInput in) throws IOException {
this(in.readMap(StreamInput::readString, StreamInput::readLong));
}

/**
* @param phaseName search phase
* @return phase took in ms, -1 if no record
*/
public long getPhaseTook(SearchPhaseName phaseName) {
return phaseTookMap.getOrDefault(phaseName.getName(), -1L);
}

@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeMap(phaseTookMap, StreamOutput::writeString, StreamOutput::writeLong);
Expand Down
Loading

0 comments on commit da16c66

Please sign in to comment.