Also, shouldn't there be at least 3 methods that take Readers; one for Text-like handling, another for UnStored, and last for UnIndexed.
How do you store the contents of a Reader? You'd have to double-buffer it, first reading it into a String to store, and then tokenizing the StringReader. A key feature of Reader values is that they're streamed: the entire value is never in RAM. Storing a Reader value would remove that advantage. The current API makes this explicit: when you want something streamed, you pass in a Reader, when you're willing to have the entire value in memory, pass in a String.
Yes, it is a bit confusing that Text(String, String) stores its value, while Text(String, Reader) does not, but it is at least well documented. And we cannot change it: that would break too many applications. But we can put this on the list for Lucene 2.0 cleanups.
When I first wrote these static methods I meant for them to be constructor-like. I wanted to have multiple Field(String, String) constructors, but that's not possible, so I used capitalized static methods instead. I've never seen anyone else do this (capitalize any method but a real constructor) so I guess I didn't start a fad! This should someday too be cleaned up. Lucene was the first Java program that I ever wrote, and thus its style is in places non-standard. Sorry.
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]