I suppose you can get them in highlighting job. Store all the text in the document's field.And use Highlighter.getBestFragment() to get what you want. Remember calling Highlighter.setTextFragmenter(new SimpleFragmenter(50)) first,it would restrict the return words' length into 50.
Store all the text in the document's field.And use Highlighter.getBestFragment() to get what you want.
Remember calling Highlighter.setTextFragmenter(new SimpleFragmenter(50)) first,it would restrict the return words' length into 50.
http://www.blogjava.net/sunfruit/archive/2006/04/05/39276.html自己做索引可以可以根据字索引的大小获得排序结果