Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/i/n/indextank-service-HEAD/api/restapi.py   indextank-service(Download)
def build_logrecord_for_add(index, document):
    return ttypes.LogRecord(index_code=index.code, 
                            docid=document['docid'], 
                            deleted=False, 
                            fields=document['fields'],
                            variables=document.get('variables', {}), 
                            categories=document.get('categories', {}))
 
def build_logrecord_for_delete(index, document):
    return ttypes.LogRecord(index_code=index.code, 
 
        if LOG_STORAGE_ENABLED:
            records = [ttypes.LogRecord(index_code=index.code, docid=docid, deleted=False, categories=categories)]
            if not send_log_storage_batch(self, index, records):
                return HttpResponse('"Currently unable to update the requested document."', status=503)
 
        if LOG_STORAGE_ENABLED:
            records = [ttypes.LogRecord(index_code=index.code, docid=docid, deleted=False, variables=variables)]
            if not send_log_storage_batch(self, index, records):
                return HttpResponse('"Currently unable to update the requested document."', status=503)