lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raj" <...@it-jobs-online.co.uk>
Subject Re:this is not custom Tokenizer
Date Fri, 13 Dec 2002 12:37:47 GMT
Sorry for my stupid question. I got the unexpected results since my query is
wrong. Now it is fixed.

I found a small and nice prgram in lucene faq to find the effect of a
Analyzer for a specific string .Here it goes.

class AnalyserTest{
  public static void main(String a[])throws Exception{

    Reader reader =new StringReader(a[0]);
    TokenStream in =new StandardAnalyzer().tokenStream(reader);

     for(;;){
       Token token=in.next();
         if(token == null)
             { break;
              }
         System.out.println("["+token.termText()+"]");
    }
  }
}




----
- Original Message -----
From: "Raj" <raj@it-jobs-online.co.uk>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
Sent: Thursday, December 12, 2002 2:43 PM
Subject: custom Tokenizer


> Hello All,
>                My program indexing a string---
> London/Bristol/LondonEast/Scotland   using standarad anlyser.
> when i seach with a word   london    it doesnt comeup in the hits.  If i
> search for "london"   it is coming.
> Where would be the problem?
> should it requires a custom tokenizer  which should tokenize the  /  s in
> the input string while indexing. Or is that facility is available in
> StandardTokenizer already.
> Thanks..
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:lucene-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:lucene-user-help@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message