lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Can you create a Field that is a copy of another Field?
Date Fri, 27 Jun 2008 04:01:09 GMT
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 * <> <blocked::>  


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message