lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Incze Lajos <>
Subject Re: Token declared final ?
Date Tue, 23 Mar 2004 22:42:51 GMT
On Tue, Mar 23, 2004 at 09:11:36AM -0800, Doug Cutting wrote:
> The 'type' field of Token would be a good place for Part-of-Speech. 
> Does that work for you?  If not, perhaps we should make Token non-final.
> As has been discussed before, Lucene uses final for two reasons.  The 
> first is historical: long ago it used to make things faster by 
> permitting javac to inline things.  The second is that some classes are 
> not designed to be subclassed, e.g., subclassing Field or Document will 
> generally cause more confusion than it will simplify an application. 
> The problem is sometimes determining which case is which.
> Doug

Wouldn't it worth to define an "Object data" general purpose
free field for the Token? I'm using type to hold some "A = B"
type properties, but in general this is neither convenient nor
scales well.


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

View raw message