lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Feldmann <>
Subject lucene search sentence
Date Thu, 27 Apr 2006 15:04:47 GMT

I wrote a Indexer which is indexing all the contents of a text and the
sentence are seperated in an other Document.

"Document document = new Document(new Field ("contents", reader ));
        StringTokenizer token = new StringTokenizer(contents.replaceAll(". ", "\\.x\\") ,
       	Document doc = new Document();
      	doc.add(new Field ("sentence", token.nextToken(),Field.Store.YES, Field.Index.TOKENIZED)

1) How do I write a Lucene Search and display all the hits in an
2) How do I display the sentence the hit is in? and color the hit.
3) How do I display the sentence before and after the sentence the hit
is in?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message