You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Madhu Satyanarayana Panitini <Ma...@pass-consulting.com> on 2005/09/12 16:05:03 UTC

about analyzer

Hai,
 
In the indexfile  method from the indexer.java file from sample chapter
in lucene in action page no. 14, In this statement
doc.add(Field.Text("contents", new FileReader(f)));  // Index file
content
 Indexing the file content and added the document to the lucent index,
which is already tokenized, I want know where it is tokenized exactly,
because I want use my own analyzer to the text, where should I add my
own analyzer. 
 
Thanks in advance
nani
 
 
 

RE: about analyzer

Posted by Koji Sekiguchi <ko...@m4.dion.ne.jp>.
You can add your own analyzer either when you create an IndexWriter
instance:

IndexWriter writer = new IndexWriter( directory, YOUR-OWN-ANALYZER, true
);

or when you add a document:

writer.addDocument( doc, YOUR-OWN-ANALYZER );

regards,

Koji


> -----Original Message-----
> From: Madhu Satyanarayana Panitini 
> [mailto:Madhu.Panitini@pass-consulting.com] 
> Sent: Monday, September 12, 2005 11:05 PM
> To: general@lucene.apache.org
> Subject: about analyzer
> 
> 
> Hai,
>  
> In the indexfile  method from the indexer.java file from 
> sample chapter
> in lucene in action page no. 14, In this statement
> doc.add(Field.Text("contents", new FileReader(f)));  // Index file
> content
>  Indexing the file content and added the document to the lucent index,
> which is already tokenized, I want know where it is tokenized exactly,
> because I want use my own analyzer to the text, where should I add my
> own analyzer. 
>  
> Thanks in advance
> nani
>  
>  
>  
>