Merge branch 'master' into ecarm002/aggregate_sql_functions

* master:
  added test case for inverted index + minor change to the c'tor (putting indexName as the last arg)
  added test case
  fix for issue 711