diff --git a/bin/goatsearch.py b/bin/goatsearch.py index 0997764..279cbc8 100644 --- a/bin/goatsearch.py +++ b/bin/goatsearch.py @@ -354,6 +354,15 @@ def generate(self): # TODO: We have to account for the fact these results may be out of time-order. + if self.debug: + yield { + "_raw": json.dumps({"url": results_uri}), + "_time": time.time(), + "source": "goatsearch", + "sourcetype": "goatsearch:debug", + "host": "localhost" + } + self.headers['Accept'] = 'application/x-nd-json' results_chunk = requests.get(