次のコードを使用して、一連のドキュメントの tf を取得しようとしています。
IndexReader r = IndexReader.open(FSDirectory.open(new File("index")));
TermFreqVector tfv = r.getTermFreqVector(root[i],"contents"); // where root[] contains the
document IDs of the documents in my corpus
ヌル ポインター例外が発生し続けます。ここで何が間違っているのか教えてください。Lucene 3.6.2 を使用していますが、インデックス作成中に termFreqVector が有効になっていることを確認する方法はありますか?