예제 #1
0
    def handle(self, *args, **options):
        self.sfm = superfastmatch.DjangoClient()

        for search_doc in SearchDocument.objects.all():
            print u"Updating {0}: {1}".format(search_doc.uuid, search_doc.title or "(untitled)")
            response = execute_search(search_doc)
            record_matches(search_doc, response, update_matches=True)
            prune_old_matches(search_doc, response)
예제 #2
0
    def handle(self, *args, **options):
        self.sfm = superfastmatch.DjangoClient()

        for search_doc in SearchDocument.objects.all():
            print u"Updating {0}: {1}".format(search_doc.uuid, search_doc.title
                                              or "(untitled)")
            response = execute_search(search_doc)
            record_matches(search_doc, response, update_matches=True)
            prune_old_matches(search_doc, response)
예제 #3
0
    def handle(self, uuid, *args, **options):
        self.sfm = superfastmatch.DjangoClient()

        search_doc = SearchDocument.objects.get(uuid=uuid)
        if search_doc:
            print u"Updating {0}: {1}".format(search_doc.uuid, search_doc.title or "(untitled)")
            response = execute_search(search_doc)
            record_matches(search_doc, response, update_matches=True)
            prune_old_matches(search_doc, response)
        else:
            raise CommandError(u"No such search document: {}".format(uuid))
예제 #4
0
    def handle(self, uuid, *args, **options):
        self.sfm = superfastmatch.DjangoClient()

        search_doc = SearchDocument.objects.get(uuid=uuid)
        if search_doc:
            print u"Updating {0}: {1}".format(search_doc.uuid, search_doc.title
                                              or "(untitled)")
            response = execute_search(search_doc)
            record_matches(search_doc, response, update_matches=True)
            prune_old_matches(search_doc, response)
        else:
            raise CommandError(u"No such search document: {}".format(uuid))