Modified elasticsearch by adding categories and nodes. #6492

Refactored tests to properly clear elastic server resources.