Fix bug in updating hierarchy
Relax dependency on elasticsearch.  Fall back to mongo regexp.