Fixes issue 197- Metadata tests not working. Running tests correctly revealed additional issues. This checkin addresses all of them

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@717 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/metadata/results/metadata_index.adm b/asterix-app/src/test/resources/metadata/results/metadata_index.adm
index a800f08..82fda87 100644
--- a/asterix-app/src/test/resources/metadata/results/metadata_index.adm
+++ b/asterix-app/src/test/resources/metadata/results/metadata_index.adm
@@ -1,9 +1,10 @@
-{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "$Dataset", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatasetName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName", "DatasetName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "GroupName", "IndexStructure": "BTREE", "SearchKey": [ "GroupName", "DataverseName", "DatasetName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "$Datatype", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "NestedDatatypeName", "TopDatatypeName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Dataverse", "IndexName": "$Dataverse", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Index", "IndexName": "$Index", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatasetName", "IndexName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Node", "IndexName": "$Node", "IndexStructure": "BTREE", "SearchKey": [ "NodeName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
-{ "DataverseName": "Metadata", "DatasetName": "Nodegroup", "IndexName": "$Nodegroup", "IndexStructure": "BTREE", "SearchKey": [ "GroupName" ], "Timestamp": "Sun May 08 16:32:43 PDT 2011"}
\ No newline at end of file
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "Dataset", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatasetName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Thu Sep 13 13:03:12 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Dataset", "IndexName": "GroupName", "IndexStructure": "BTREE", "SearchKey": [ "GroupName", "DataverseName", "DatasetName" ], "IsPrimary": false, "Timestamp": "Thu Sep 13 13:03:12 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "Datatype", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatatypeName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Datatype", "IndexName": "DatatypeName", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "NestedDatatypeName", "TopDatatypeName" ], "IsPrimary": false, "Timestamp": "Thu Sep 13 13:03:12 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Dataverse", "IndexName": "Dataverse", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Function", "IndexName": "Function", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "FunctionName", "FunctionArity" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Index", "IndexName": "Index", "IndexStructure": "BTREE", "SearchKey": [ "DataverseName", "DatasetName", "IndexName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Node", "IndexName": "Node", "IndexStructure": "BTREE", "SearchKey": [ "NodeName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }
+{ "DataverseName": "Metadata", "DatasetName": "Nodegroup", "IndexName": "Nodegroup", "IndexStructure": "BTREE", "SearchKey": [ "GroupName" ], "IsPrimary": true, "Timestamp": "Thu Sep 13 13:03:11 PDT 2012" }