Hello Lucene Gurus,

 

I'm new to Lucene so sorry if this question basic or naïve.

 

I have a Document to which I want to add a Field named, say, "foo" that is 
tokenized, indexed and unstored.  I am using the "Field(String name, 
TokenStream tokenStream)" constructor to create it.  The TokenStream may take a 
fairly long time to return all its tokens.

 

Now for querying reasons I want to add another Field named, say, "bar", that is 
tokenized and indexed in exactly the same way as "foo".  I could just pass it 
the same TokenStream that I used to create "foo" but since it takes so long to 
return all its tokens, I was wondering if there is a way to say, create "bar" 
as a copy of "foo".  I looked thru the javadoc but didn't see anything.  

 

Is this possible in Lucene or do I just have to bite the bullet build the new 
Field using the same TokenStream again?

--
Bill Chesky * Sr. Software Developer * SunGard * FAME Energy * 1194 Oak Valley 
Drive * Ann Arbor, MI 48103
Tel 734-332-4405 * Fax 734-332-4440 * [EMAIL PROTECTED] <mailto:[EMAIL 
PROTECTED]> 
 www.sungard.com/energy <blocked::http://www.sungard.com/energy>  

 

Reply via email to