Thanks a lot Erick
Boris
* Erick Erickson <[EMAIL PROTECTED]> [Thu, 21 Sep 2006 20:53:42
-0400]:
I think you want a PerFieldAnalyzerWrapper. It allows you to make a
different analyzer for each field in your document. You'll have to
write
the
code to extract the file contents in your desired formats for each
field,
but you probably do that already <G>...
You can instantiate your IndexWriter with an instance of a
PerFieldAnalyzerWrapper and it all "just happens" after that......
>From the javadoc for PerFieldAnalyzerWrapper...
<<< This analyzer is used to facilitate scenarios where different
fields
require different analysis techniques.>>>
Best
Erick
On 9/21/06, Boris Galitsky <[EMAIL PROTECTED]> wrote:
>
> I need to create two fields for Lucene documents populated
> 1) by numbers
> 2) by other strings
> 3) by values of another specific format
>
> What kind of Analyzer would do it?
>
> Using the customized analyzer, the current code is like
>
> IndexWriter indexWriter = new IndexWriter(indexDir, analyzer, true);
> Document doc = new Document();
> doc.add(new Field("numeric_contents", new FileReader(f))); //
> numeric tokens
> doc.add(new Filed("other_contents", new FileReader(f)));
//the
> same file but other than numeric tokens
>
> Thanks
> --
> Boris Galitsky.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Boris Galitsky.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]