How to get the Greater or Last Value in a Document for doing filter

Unfortunately, at the moment it's not possible. Here's the detailed answer: Extract Max value of build number from result and use it in filter value - #2 by Ajinkya_Sabale