lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viparthi, Kiran (AFIS)" <>
Subject RE: Did you mean...
Date Mon, 16 Feb 2004 11:02:38 GMT
Hi Timo,

I was mentioning to your previous code that you can collect all the text
from term.

IndexReader reader =;
TermEnum te = reader.terms();
StringBuffer sb = new StringBuffer();
Term t = te.term();

And you can get the tokens using StringTokenizer on the sb.toString() and
put them into Map by calculating the occurrences.
As mentioned I didn't use any information from index so I didn't uses any
TokenStream but let me check it out.


-----Original Message-----
From: [] 
Sent: 16 February 2004 11:38
To: Lucene Users List
Subject: Re: Did you mean...

On Thursday 12 February 2004 18:35, Viparthi, Kiran (AFIS) wrote:
> As mentioned the only way I can see is to get the output of the 
> analyzer directly as a TokenStream iterate through it and insert it 
> into a Map.

Could you provide or point me to some example code on how to get and use 
TokenStream. The API docs are somewhat unclear to me...

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

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

View raw message