[
https://issues.apache.org/jira/browse/LUCENE-4218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447850#comment-13447850
]
Robert Muir commented on LUCENE-4218:
-------------------------------------
The next question: should the fix really be in Document.java or Field.java:
In 3.x, the stringValue() of a numeric field returned its string representation.
in trunk/4.x, this isnt true: and it makes some things confusing, like the
javadocs
of stringValue itself (clearly bogus)
{code}
/**
* The value of the field as a String, or null. If null, the Reader value or
* binary value is used. Exactly one of stringValue(), readerValue(), and
* getBinaryValue() must be set.
*/
public String stringValue() {
return fieldsData instanceof String ? (String) fieldsData : null;
}
{code}
> contrary to documentation Document.get(field) on numeric field returns null
> ---------------------------------------------------------------------------
>
> Key: LUCENE-4218
> URL: https://issues.apache.org/jira/browse/LUCENE-4218
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/search
> Affects Versions: 4.0-ALPHA
> Environment: Darwin e4-ce-8f-0f-c2-b0.dummy.porta.siemens.net 10.8.0
> Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011;
> root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64
> Reporter: Jamie
> Assignee: Robert Muir
> Priority: Critical
> Labels: Document
> Fix For: 4.0
>
> Attachments: LUCENE-4218.patch
>
>
> A call to Numeric num = indexableField.numericValue() comes up with a correct
> value, whereas Document.get(field) yields null.
--
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: [email protected]
For additional commands, e-mail: [email protected]