Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Lucene の 1 項のオフセットを取得したい。どうすれば入手できますか?
コンテンツを次のようにベクトル化しました
Field.TermVector.WITH_POSITIONS_OFFSETS
Lucene に 1 つの Document 内の用語のオフセットを与えるメソッドはありますか?
これを試して:
TermPositionVector vector = (TermPositionVector) reader.getTermFreqVector(docId, myfield);
必要な情報を取得するには、 http://lucene.apache.org/core/3_0_3/api/core/org/apache/lucene/index/TermPositionVector.htmlを参照してください。