lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <>
Subject Re: Index and Field.Text
Date Fri, 05 Dec 2003 16:32:58 GMT
On Friday 05 December 2003 08:22, Erik Hatcher wrote:
> On Friday, December 5, 2003, at 09:48  AM, Grant Ingersoll wrote:
> > Field.Text(String, String) instead of the Field.Text(String, Reader)
> > version, which means I am storing the contents in the index.
> So use Field.UnStored(String, String) then.  It is the same as
> Field.Text(String, Reader).
> The static "factory" methods on Field are merely for convenience.  You
> can control all the flags yourself using the constructor:

I think it's almost a bug that they act differently, although having same 
method name. I don't think method should be called Text() if it behaves like 
UnStored()? Additionally, implementation for non-public constructor relies on 
default values for isIndexed, isStored and isTokenized; it probably should 
take those from static method for clarity?

Also, shouldn't there be at least 3 methods that take Readers; one for 
Text-like handling, another for UnStored, and last for UnIndexed. It's 
probably ok not to have one for keywords. For other types, though, it's often 
more convenient to just pass in Reader.
(internally difference between passing in a Reader or String is not huge, as 
String will be accessed via StringReader).

-+ Tatu +-

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message