[ 
https://issues.apache.org/jira/browse/LUCENE-8870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16870200#comment-16870200
 ] 

Mike Sokolov commented on LUCENE-8870:
--------------------------------------

Personally I find the Field type-facade kind of annoying; it imposes this 
artificial type safety: in the end we store the value as an Object and then 
later cast it. Callers that also handle values generically, as Objects then 
need an adapter to detect  the type of a value, cast it properly, only to have 
Lucene throw away all the type info and do that dance all over again internally!

Having said that, it's not really relevant to this change, which seems helpful. 
Maybe use {{Objects.requireNonNull}} for the null checks?

> Support numeric value in Field class
> ------------------------------------
>
>                 Key: LUCENE-8870
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8870
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Namgyu Kim
>            Priority: Major
>         Attachments: LUCENE-8870.patch
>
>
> I checked the following comment in Field class.
> {code:java}
> // TODO: allow direct construction of int, long, float, double value too..?
> {code}
> We already have some fields like IntPoint and StoredField, but I think it's 
> okay.
> The test cases are set in the TestField class.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to