lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patricio Galeas" <>
Subject AW: Terms & Postion from Hits ...
Date Tue, 12 Apr 2005 14:32:12 GMT
Do You mean: 
I must compile the latest classes of
/lucene/java/trunk/src/java/org/apache/lucene/index (Rev.159229)
/lucene/java/trunk/src/java/org/apache/lucene/document (Rev.150682)

and actualize my actual version of Lucene?

Thank You for your help!!



-----Urspr√ľngliche Nachricht-----
Von: Erik Hatcher [] 
Gesendet: Montag, 11. April 2005 15:05
Betreff: Re: Terms & Postion from Hits ...

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.


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

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

View raw message