internal ElasticSearchReader(ElasticSearchCommand command)
        {
            _command = command;
            MakeNextQuery();

            _sync.WaitOne();

            if (_response.Error != null)
            {
                throw new DataException($"ElasticSearch request error: {_response.Error.Type} {_response.Error.Reason} {_response.Error.Unroll()}");
            }
        }
 public void Dispose()
 {
     _command  = null;
     _response = null;
 }