I'd like to take advantage of [runtime_mappings] in a search request, specifically leveraging that runtime_field as a filter. In that scenario, while I may only have a size of 50 to return the top 50 docs, I also request the count using the same query to get the entire count of records that matched. Unfortunately, I cannot specify [runtime_mappings] in a count request as that returns a 400 parsing exception.
I cannot use index mapping of the runtime field because I need to feed in params (such as the user's timezone offset) in order to calculate dates accurately. I cannot find a way to pass params in a search request to a runtime field defined via an index mapping.