lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From starz10de <farag_ah...@yahoo.com>
Subject Re: [ANN] Printing lucene index content
Date Sat, 03 Mar 2007 22:59:40 GMT



karl wettin-3 wrote:
> 
> 
> 3 mar 2007 kl. 23.18 skrev starz10de:
> 
>>>>>
>>>>>  IndexReader ir = IndexReader.open("index");
>>>>>
>>>>>       TermEnum terms=ir.terms();
>>>>>
>>>>>       TermEnum termEnum = ir.getReader().terms();
>>>>>       while (termEnum.next()) {
>>>>>          TermDocs dok = ir.getReader().termDocs();
>>>>>          dok.seek(termEnum);
>>>>>          while (dok.next()) {
>>>>>            System.out.println(dok.doc() + "\t" + dok.freq() +  
>>>>> "\t" +
>>>>>       termEnum.term());
>>>>>          }
>>>>>       }
> 
>>> my text file is " hello every one"
>>> i successed to display the text file  but with :
>>> -
>>> -
>>> modified:0eyulpzyg
>>> path:c:\test\1.txt
>>>
>>> which i don't need to access ,how i can avoid printing that.
> 
> if (!"modified".equals(termEnum.term().field() && !"path".equals 
> (termEnum.term().field()) {
> 
> ?
> 
> -- 
> karl
> 
> hi karl,
> 
> thank you very much !!!
> that what i wanted :)
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Printing-lucene-index-content-tf3338412.html#a9290735
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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