Fixed range aggregation alignment, added sample_size to query results.