Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: General

about analyzer

 

 

Lucene general RSS feed   Index | Next | Previous | View Threaded


Madhu.Panitini at pass-consulting

Sep 12, 2005, 7:05 AM

Post #1 of 2 (1243 views)
Permalink
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


koji.sekiguchi at m4

Sep 12, 2005, 8:02 AM

Post #2 of 2 (1092 views)
Permalink
RE: about analyzer [In reply to]

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[at]pass-consulting.com]
> Sent: Monday, September 12, 2005 11:05 PM
> To: general[at]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
>
>
>
>

Lucene general RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.