You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2008/08/06 23:46:10 UTC

Re: Document path in lucene index

: 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