[ https://issues.apache.org/jira/browse/LUCENE-3065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-3065: ---------------------------------- Attachment: LUCENE-3065.patch Updated patch with some improvements: - NumericField now lazy inits the NumericTokenStream only when tokenStreamValue() is caled for the first time. This speeds up stored fields reading, as the TokenStream is generally not needed in that case. - I currently dont like the instanceof chains in FieldsWriter and this lazy init code. Maybe NumericField and NumericTokenStream should define an enum type for the value so you can call NumericField.getValueType() - does anybody have a better idea? - Improved JavaDocs for NumericField to reflect the new stored fields format > NumericField should be stored in binary format in index (matching Solr's > format) > -------------------------------------------------------------------------------- > > Key: LUCENE-3065 > URL: https://issues.apache.org/jira/browse/LUCENE-3065 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Reporter: Michael McCandless > Assignee: Uwe Schindler > Priority: Minor > Fix For: 3.2, 4.0 > > Attachments: LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, > LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, LUCENE-3065.patch, > LUCENE-3065.patch > > > (Spinoff of LUCENE-3001) > Today when writing stored fields we don't record that the field was a > NumericField, and so at IndexReader time you get back an "ordinary" Field and > your number has turned into a string. See > https://issues.apache.org/jira/browse/LUCENE-1701?focusedCommentId=12721972&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12721972 > We have spare bits already in stored fields, so, we should use one to record > that the field is numeric, and then encode the numeric field in Solr's > more-compact binary format. > A nice side-effect is we fix the long standing issue that you don't get a > NumericField back when loading your document. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org