I am just want to build a small index file system (with over 3000 text files and beyond 5 GB).I have already searched results form Google or something else but did not get what I wants.All of the results are related to Lucene,however I just want to do it without any third libraries,will you give me some advice or some examples?
質問する
110 次
1 に答える
0
非常に基本的な解決策は、転置インデックスを使用することです。ここで、インデックスを作成するすべてのドキュメントを読み取り、キーとして見つかった単語をマップに保存します。値は、それらの単語を含むドキュメントのリストです。
doc 1;
これはサンプルドキュメントです
doc 2;
このドキュメントは2番目です
あなたの地図は持っているでしょう;
this -> doc1, doc2
is -> doc1, doc2
an -> doc1
example -> doc1
document -> doc1, doc2
number -> doc2
two -> doc2
于 2013-01-07T11:39:15.817 に答える