インデックスを作成しましたが、大量のジャンク データがあります。私が達成したいのは、より多くの投票がより高いブースト値に相当する投票システムです。残念ながら、ユーザーが投票を送信した後、ブースト値はインデックスに保存されません。
これは私のBoost関数のコードの内訳です.誰かが私が間違っていることについて何か考えを持っていますか? Explain() を使用しましたが、ブースト値に関連するものは何もありません。
BoostUp(int documentId)
{
IndexSearcher searcher = new IndexSearcher(dir);
Document oldDoc = search.doc(documentId);
//get all the stored information from old document
Document updatedDocument = new Document();
//Add fields containing data from old document.
updatedDocument.Boost = oldDoc.Boost * 1.5F;
IndexWriter writer = new IndexWriter(dir, new StandardAnalyzer(Version.LUCENE_30), false, MaxFieldLength.LIMITED);
Term uniqueTerm = new term("content_id", content_id_from_old_document);
writer.UpdateDocument(uniqueTerm, updatedDocument);
writer.Commit();
writer.Dispose();
}