code: def ensureHashIndex(self, fields, unique = False, sparse = True, deduplicate = False) :
          
          data = {
              "type" : "hash",
              "fields" : fields,
              "unique" : unique,
              "sparse" : sparse,
              "deduplicate": deduplicate
          }
          ind = Index(self, creationData = data)
          self.indexes["hash"][ind.infos["id"]] = ind
          return ind
docs: Creates a hash index if it does not already exist, and returns it