Overrided the es_result method and added the build_es_query method

http://manage.dimagi.com/default.asp?111155#627771