[jira] [Commented] (PYLUCENE-50) StoredField of an int has the wrong type.

2019-06-17 Thread Andi Vajda (JIRA)


[ 
https://issues.apache.org/jira/browse/PYLUCENE-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866175#comment-16866175
 ] 

Andi Vajda commented on PYLUCENE-50:


Thank you, Aric, for you reporting this.

Andi..


?? {{field = document.StoredField('', 0)}}


> StoredField of an int has the wrong type.
> -
>
> Key: PYLUCENE-50
> URL: https://issues.apache.org/jira/browse/PYLUCENE-50
> Project: PyLucene
>  Issue Type: Bug
> Environment: Python 3 official docker container, 8.1.1rc
>Reporter: A. Coady
>Priority: Critical
>
> The StoredField constructor is interpreting ints as bytes.  It's only 
> reproducing on the 8 rc.
> {{import lucene}}
>  {{lucene.initVM()}}
>  {{from org.apache.lucene import document}}
>   
>  {{field = document.StoredField('', 0)}}
>  {{print(field.numericValue(), field.binaryValue())}}



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


[jira] [Commented] (PYLUCENE-50) StoredField of an int has the wrong type.

2019-06-17 Thread Andi Vajda (JIRA)


[ 
https://issues.apache.org/jira/browse/PYLUCENE-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16866171#comment-16866171
 ] 

Andi Vajda commented on PYLUCENE-50:


For the longest time, it was possible to pass an int where a byte was expected. 
This overlap was intentional and, probably, for convenience. The fix to 
PYLUCENE-47 changed the order in which signatures were considered and may have 
caused this long latent bug to now bite.
To fix this, I removed the overlap. To pass a byte, use b'x'.


> StoredField of an int has the wrong type.
> -
>
> Key: PYLUCENE-50
> URL: https://issues.apache.org/jira/browse/PYLUCENE-50
> Project: PyLucene
>  Issue Type: Bug
> Environment: Python 3 official docker container, 8.1.1rc
>Reporter: A. Coady
>Priority: Critical
>
> The StoredField constructor is interpreting ints as bytes.  It's only 
> reproducing on the 8 rc.
> {{import lucene}}
>  {{lucene.initVM()}}
>  {{from org.apache.lucene import document}}
>   
>  {{field = document.StoredField('', 0)}}
>  {{print(field.numericValue(), field.binaryValue())}}



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