@Path("dropIndex")
public String dropIndex(@PathParam("dbName") final String dbName, @FormParam("nameSpace") final String nameSpace, @FormParam("indexName") final String indexName, @DefaultValue("POST") @QueryParam("connectionId") final String connectionId, @Context final HttpServletRequest request) {
String response = new ResponseTemplate().execute(logger, connectionId, request, new ResponseCallback() {
@Override
public Object execute() throws Exception {
SystemCollectionService systemCollectionService = new SystemCollectionServiceImpl(connectionId);
//The collection name is obtained by removing the DB name from the namespace.
String collectionName = nameSpace.replace(dbName + ".", "");
return systemCollectionService.removeIndex(dbName, collectionName, indexName);
}
});
return response;
}