Added attribute to allow query function to be specified

Allows a query function to be specified that means the data loading and, optionally, the term matching to be offloaded to a webservice.