テキストを含む一連のドキュメントが与えられた場合、フレーズを検索し、すべての一致を返し、それらをランク付けしたいと思います。lucene/solr を取得してどのドキュメントが一致するかを示し、ドキュメント内で強調表示する方法は知っていますが、同じドキュメントから複数の一致を含むランキングを取得するにはどうすればよいですか?
First document. It has a single line of text.
Second document. This text line is quite short.
This is another line containing more text and is a bit longer.
「テキスト行」を検索した場合、次のようにランク付けされた 3 つの一致を見つけたいと思います。
2nd document -> ...This "text line" is quite short.
1st document -> ...It has a single "line of text".
2nd document -> ...another "line containing more text" and is...
これは可能ですか?どのように?