コード例 #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))