How to use the darksearch.tools.elas.DarkElastic function in darksearch

To help you get started, we’ve selected a few darksearch examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vlall / Darksearch / darksearch / tools / elas.py View on Github external
def runSetup(self, jsonPath):
        self.pandas_to_json(jsonPath)
        self.save_json(self.searchIndex)

    def check_cat(self, description):
        return 'tor'

    def free_mem(self):
        del self.briefList
        del self.namesList
        del self.datesList
        del self.titleList

if __name__ == '__main__':
    test = DarkElastic()
    test.runSetup("../logs/process2.json")
    #  Build your index.
    test.ingest_items()
    es.indices.refresh(index='dark')
    print test.search_index('dark', 'cocaine', 15, 10)

darksearch

Python API wrapper for DarkSearch (darksearch.io).

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis

Similar packages