You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andrew Lundgren (JIRA)" <ji...@apache.org> on 2013/03/18 18:26:15 UTC

[jira] [Created] (SOLR-4610) Calling query.toString will print binary values for encoded integer values in terms.

Andrew Lundgren created SOLR-4610:
-------------------------------------

             Summary: Calling query.toString will print binary values for encoded integer values in terms.
                 Key: SOLR-4610
                 URL: https://issues.apache.org/jira/browse/SOLR-4610
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 4.2, 4.1, 3.6.2, 3.4
            Reporter: Andrew Lundgren


When calling toSting on a query that contains terms with encoded integers, the encoded integers are not decoded using the encodedToReadable() call.  

The result is that the integers are printed out as their encoded binary form rather than a readable form.

Investigating the Term.java showed that the toString method just converts the utf8bytes to a string.  There isn't any indication of the data type stored in the bytes at this level.  Without the data type, it does not appear that the term can be correctly printed without access to the schema (not a good thing).  

I think to fix this, it might require adding the type into the term and all of the plumbing to get the type passed down to this low level.  

This could be done with setters that accept specific types and handle the encoding themselves.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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