elasticsearch/elasticsearch — pull request #2080 by imotov (2012-07-03 16:03:43+00:00)
Title: Add initial implementation of script_source

What do you think about this solution for the external source problem? It basically allows users to replace source in the query using a script. The replaced source is then used for highlighting, in script fields, etc. Here is a small demo: https://gist.github.com/3040566