Esempio n. 1
0
def readDownloadResponseDocumentDescription(input):
    title = serializer.read_vstring(input)
    publication_time = serializer.read_integer(input)
    mime_type = serializer.read_vstring(input)
    size = serializer.read_integer(input)
    url = serializer.read_vstring(input)
    provider_count = serializer.read_short(input)
    return (title, publication_time, mime_type, size, url, provider_count)
Esempio n. 2
0
def readDownloadResponseDocumentDescription(input):
    title = serializer.read_vstring(input)
    publication_time = serializer.read_integer(input)
    mime_type = serializer.read_vstring(input)
    size = serializer.read_integer(input)
    url = serializer.read_vstring(input)
    provider_count = serializer.read_short(input)
    return (title, publication_time, mime_type, size, url, provider_count)
Esempio n. 3
0
def readSearchResponseHitScore(input):
    return (
        # word
        serializer.read_vstring(input),
        # relevance
        serializer.read_float(input),
        # popularity
        serializer.read_float(input),
        # excerpt
        serializer.read_vstring(input),
        # excerpt position
        serializer.read_integer(input),
        # position
        serializer.read_integer(input))
Esempio n. 4
0
def readSearchResponseHitScore(input):
    return (
            # word
            serializer.read_vstring(input),
            # relevance
            serializer.read_float(input),
            # popularity
            serializer.read_float(input),
            # excerpt
            serializer.read_vstring(input),
            # excerpt position
            serializer.read_integer(input),
            # position
            serializer.read_integer(input)
    )
Esempio n. 5
0
def readDownloadRequest(input):
    document_id = binascii.b2a_hex(serializer.read_string(input, 20))
    word_count = serializer.read_char(input)
    search_query = [];
    for i in range(0, word_count):
        search_query.append(serializer.read_vstring(input))
    return (document_id, search_query)
Esempio n. 6
0
def readDownloadRequest(input):
    document_id = binascii.b2a_hex(serializer.read_string(input, 20))
    word_count = serializer.read_char(input)
    search_query = []
    for i in range(0, word_count):
        search_query.append(serializer.read_vstring(input))
    return (document_id, search_query)
Esempio n. 7
0
def readSearchResponseHitInfo(input):
    return (
        # document id
        binascii.b2a_hex(serializer.read_string(input, 20)),
        # mime_type
        serializer.read_vstring(input),
        # url
        serializer.read_vstring(input),
        # publication time
        serializer.read_integer(input),
        # file size
        serializer.read_integer(input),
        # title
        serializer.read_vstring(input),
        # score count
        serializer.read_char(input),
        # provider count
        serializer.read_char(input))
Esempio n. 8
0
def readSearchResponseHitInfo(input):
    return (
            # document id
            binascii.b2a_hex(serializer.read_string(input, 20)),
            # mime_type
            serializer.read_vstring(input),
            # url
            serializer.read_vstring(input),
            # publication time
            serializer.read_integer(input),
            # file size
            serializer.read_integer(input),
            # title
            serializer.read_vstring(input),
            # score count
            serializer.read_char(input),
            # provider count
            serializer.read_char(input)
    )
Esempio n. 9
0
def readSearchRequest(input):
    # min_score
    min_score = serializer.read_float(input)
    # forwarding node count
    forwarding_node_count = serializer.read_char(input)
    # result count
    result_count = serializer.read_char(input)
    # search query word count 
    word_count = serializer.read_char(input)
    search_query = []
    for i in range(0, word_count):
        search_query.append(serializer.read_vstring(input))
    return (min_score, forwarding_node_count, result_count, search_query)
Esempio n. 10
0
def readSearchRequest(input):
    # min_score
    min_score = serializer.read_float(input)
    # forwarding node count
    forwarding_node_count = serializer.read_char(input)
    # result count
    result_count = serializer.read_char(input)
    # search query word count
    word_count = serializer.read_char(input)
    search_query = []
    for i in range(0, word_count):
        search_query.append(serializer.read_vstring(input))
    return (min_score, forwarding_node_count, result_count, search_query)