lucene-java-user mailing list archives

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

and actualize my actual version of Lucene?

Thank You for your help!!

Patricio



 

-----Urspr√ľngliche Nachricht-----
Von: Erik Hatcher [mailto:erik@ehatchersolutions.com] 
Gesendet: Montag, 11. April 2005 15:05
An: java-user@lucene.apache.org
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.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message