How can I use percentile aggregation result as a range query boundary

#1

Hi,
I want to write a filter which can pick out 95 percent hits. These hits TotalTiming field range from 0 to P95 of All TotalTiming. So I wonder how can I use this 95 percentile aggregation result as a range query top line. It is a variable, but the range query seems to only accept numeric param.
If this cannot be realized, are there other solutions can achieve this feature?

#2

Anyone hereļ¼Ÿ