On Apr 10, 2005, at 11:52 AM, Patricio Galeas wrote:
Hello, I am new with Lucene. I have following problem. When I execute a search I receive the list of document Hits. I get without problem the content of the documents too:
for (int i = 0; i < hits.length(); i++) { Document doc = hits.doc(i); System.out.println(doc.get("content")); }
Now, I would like to obtain the List of all Terms (and their corresponding
position) from each document (hits.doc(i)).
Lucene 1.4.x contains a term vector feature (see the javadocs for Field) that you can enable. This does not give you position information though. In the latest codebase (obtained via Subversion) the term vector feature has been enhanced to allow (optionally) the capturing of term positions and then also term offsets.
I recommend you try out the latest codebase for these features.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]