3

私はLuceneでインデックスを作成しており、関連するドキュメントのIDをLuceneから取得することにのみ関心があります(つまり、フィールド値や強調表示情報ではありません)。これらの要件を考えると、検索のパフォーマンス(速度)や品質(結果)に影響を与えることなく、どの用語ベクトルを使用する必要がありますか?私もMoreLikeThisを使用するので、必要ありません

TermVector.YES—Records the unique terms that occurred, and their counts, in each document, but doesn’t store any positions or offsets information

TermVector.WITH_POSITIONS—Records the unique terms and their counts, and also the positions of each occurrence of every term, but no offsets

TermVector.WITH_OFFSETS—Records the unique terms and their counts, with the offsets (start and end character position) of each occurrence of every term, but no positions

TermVector.WITH_POSITIONS_OFFSETS—Stores unique terms and their counts, along with positions and offsets

ありがとう。

4

1 に答える 1

0

クエリの種類によって異なります...ID に関連するデータがある場合は、ポジションおよび/またはオフセットが必要になります。

次のようなドキュメントがある場合:「何とか何とか日付何とかID何とか名前何とか」

その特定の ID を見つけたいだけなら、TermVector Yes で問題ありません。ただし、日付または名前にどれだけ近いか (高度なクエリを使用) に基づいて ID を検索する場合は、追加の用語の位置が必要になります。

いつでもこれを試すことができ、簡単に変更できます。10 億レコードのインデックスなどを単体テストする必要がない場合:)

ところで...私たちの「Lucene in Action」をチェックしてください。本はこのすべての情報をカバーしています。

于 2012-11-04T14:25:50.377 に答える