Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 7224 invoked from network); 16 Feb 2004 11:03:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Feb 2004 11:03:07 -0000 Received: (qmail 68476 invoked by uid 500); 16 Feb 2004 11:02:34 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 68451 invoked by uid 500); 16 Feb 2004 11:02:34 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 68437 invoked from network); 16 Feb 2004 11:02:34 -0000 Received: from unknown (HELO smtpmail.fao.org) (168.202.2.12) by daedalus.apache.org with SMTP; 16 Feb 2004 11:02:34 -0000 Received: from CONVERSION-DAEMON.smtpmail.fao.org by smtpmail.fao.org (PMDF V6.2-X17 #30673) id <0HT600I01C6IPF@smtpmail.fao.org> for lucene-user@jakarta.apache.org; Mon, 16 Feb 2004 12:06:18 +0100 (MET) Received: from afexch1.fao.org (afexch1.fao.org [168.202.2.84]) by smtpmail.fao.org (PMDF V6.2-X17 #30673) with ESMTP id <0HT600I0TC6IIY@smtpmail.fao.org> for lucene-user@jakarta.apache.org; Mon, 16 Feb 2004 12:06:18 +0100 (MET) Received: by afexch1.fao.org with Internet Mail Service (5.5.2657.72) id <1W93QQ9Y>; Mon, 16 Feb 2004 12:02:46 +0100 Content-return: allowed Date: Mon, 16 Feb 2004 12:02:38 +0100 From: "Viparthi, Kiran (AFIS)" Subject: RE: Did you mean... To: 'Lucene Users List' Message-id: MIME-version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-type: text/plain Content-transfer-encoding: 7BIT X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Timo, I was mentioning to your previous code that you can collect all the text from term. IndexReader reader = IndexReader.open(ram); TermEnum te = reader.terms(); StringBuffer sb = new StringBuffer(); while(te.next()) { Term t = te.term(); sb.append(t.text()); } 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. Kiran -----Original Message----- From: lucene@nitwit.de [mailto:lucene@nitwit.de] 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: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org