At the moment I can think of - Making an ajax call to servlet and doing the query over there (use service) and returning json object to populate the results through js. Each call will only get a set of results. On scroll the call is made again.
The logic for query will be same as you would be doing already. Also suggest to use Sightly.