Hi all,

I am new to Lucene and I have been reading the book "Lucene In Action",
here is my question:

When searching for a word through an index is there any way to know in
which positions (may be more than one) of each document that word was
found?

The index is constructed in the following way:
---------------------
IndexWriter writer = new IndexWriter("/path/to/the/index/dir", 
new StandardAnalyzer(), true);

writer.setUseCompoundFile(false);

Document doc = new Document();

doc.add(new Field("contents", 
new FileReader(f),Field.TermVector.WITH_POSITIONS_OFFSETS));

doc.add(new Field("filename", f.getCanonicalPath(), Field.Store.YES,
Field.Index.NO_NORMS));

writer.addDocument(doc);
.....
--------------------


Thanks in advance
--
Felipe.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to