@PreDestroy public void close(){
  if (node != null) {
    node.close();
  }
  if (client != null) {
    client.close();
    client=null;
  }
}

@ PreDestroy public void close ( ) { if ( node != null ) { node . close ( ) ; } if ( client != null ) { client . close ( ) ; client = null ; } }
this method closes the elasticsearch client .
