But this is not the solution I am looking for. As I mentioned I wanted to implement in a similar way Rule Search is implemented in Designer Studio. And from what I know of how rule search, the implementation is not that straight forward.
The logic provided by you is already there in our application. We wanted to move away from from report definition based search to index based search.