lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Document path in lucene index
Date Wed, 06 Aug 2008 21:46:10 GMT

: I can print the index terms but I don't know if there is any possibilites to
: print the coressbonds paths, i can just print the docid, but i need to print
: the paths as it is possible in searcher (query).

If you index or store the path in a field, then you can get it back out -- 
for the type of look you've got bellow, i would suggest indexing the path 
untokenized and then usingthe FieldCache to get the value of each path for 
each doc...

: IndexReader ir = IndexReader.open(index); 
: TermEnum termEnum = ir.terms(); 
: while (termEnum.next()) { 
:                         TermDocs dok = ir.termDocs(); 
:                         dok.seek(termEnum); 
:                         while (dok.next()) { 
:  System.out.println(indexTerm+"          "+dok.freq()+"        "+dok.doc());           
   
:                  } 


-Hoss


---------------------------------------------------------------------
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