Re: Some Problem with Lucene in Java

2011-02-03 Thread Felipe Lobo
If i understand you question right, you want do generate the snippet for the result documents. You can do something like the code below: QueryScorer scorer = new QueryScorer(query); Highlighter highlighter = new Highlighter(scorer); highlighter.setTextFragmenter(new SimpleSpanFragmenter(scorer));

Some Problem with Lucene in Java

2011-02-03 Thread Cescy
Hi, I am developing an advanced pdf search engine in java by using pdfbox and lucene. And I must display the context of each keyword in the user interface, but i cannot find a method to do so. Most of the methods provided are used to deal with documents with whole content in the specified fiel