FAQ

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: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 7 | next ›
Discussion Overview
groupjava-user @
categorieslucene
postedDec 5, '03 at 2:48p
activeDec 7, '03 at 11:16p
posts7
users6
websitelucene.apache.org

People

Translate

site design / logo © 2021 Grokbase