added parameter validation for indexName, more tests