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

Adrien Grand commented on LUCENE-8108:
--------------------------------------

+1 to be less lenient. If someone needs to do something like this, I'd rather 
like the toString conversion to be performed by the user before creating the 
Field instance.

> Field class should not let you analyze int values?
> --------------------------------------------------
>
>                 Key: LUCENE-8108
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8108
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>         Attachments: LUCENE-8108.patch
>
>
> I stumbled on this by accident, by creating a {{Field}} instance with a 
> {{Integer}} value for its {{fieldsData}} and then setting {{tokenized = 
> true}} in its {{FieldType}}.
> If you do this then Lucene silently converts the int to a string and then 
> tokenizes it, e.g. applying synonyms, etc., if that's what your analysis 
> chain does.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to