Information_retrieva_Projectl- icon indicating copy to clipboard operation
Information_retrieva_Projectl- copied to clipboard

简化:在合并索引文件过程,word相同时,没必要比较doc_id,因索引文件是按序产生

Open Google1234 opened this issue 8 years ago • 0 comments

                if int(doc1[i])<int(doc2[j]):
                    write_block1.push(':'+doc1[i]+'#'+tf1[i])
                    i+=1
                else:
                    if int(doc1[i])>int(doc2[j]):
                        write_block1.push(':'+doc2[j]+'#'+tf2[j])
                        j+=1
                    else:
                        write_block1.push(':'+doc2[j]+'#'+str(int(tf1[i])+int(tf2[j])))
                        i+=1
                        j+=1

Google1234 avatar May 16 '16 10:05 Google1234