test search


for docID in result:
    ##
    # find the length of the docID
    sql='select html from docs where docID=%s;'
    cur.execute(sql, docID[0])
    db.commit()
    html_data = cur.fetchone()

    for aToken in query:
        sql='select pos from indexterms where terms=%s AND docID=%s;'
        cur.execute(sql, (aToken,docID[0]))
        db.commit()
        jian_data = cur.fetchall()
    break