[ https://issues.apache.org/jira/browse/LUCENE-2354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2354: ---------------------------------- Attachment: LUCENE-2354.patch Here a first preview patch. NumericUtils still contains lots of unused String-based methods, I think we should remove them, the class is expert-only and also experimental. Backwards compatibility is broken even with those backwards layers (as the split functions were changed to use BytesRefs. Also these backwards methods are simply slow now (as the byte[] is copied to char[] and vice-versa). The new NumericTokenStream now uses a special NumericTermAttribute, so possibly Filters coming later have access to shift value and so on. This attribute also implements the TermToBytesRefAttribute for the indexer. Please note: This attribute is a hack and does not support copyTo/clone/...., so you cannot put away tokens (which is not needed), but its still possible to add further attributes to numeric tokens (which is why the attribute is there). The NumericTokenStream backwards test was removed, because the new stream does no longer contain a TermAttribute, so the test always fails. TODO: A better inline-hashCode generation for the numeric-to-BytesRef transformation > Convert NumericUtils and NumericTokenStream to use BytesRef instead of > Strings/char[] > ------------------------------------------------------------------------------------- > > Key: LUCENE-2354 > URL: https://issues.apache.org/jira/browse/LUCENE-2354 > Project: Lucene - Java > Issue Type: Improvement > Affects Versions: Flex Branch > Reporter: Uwe Schindler > Assignee: Uwe Schindler > Fix For: Flex Branch > > Attachments: LUCENE-2354.patch > > > After LUCENE-2302, we should use TermToBytesRefAttribute to index using > NumericTokenStream. This also should convert the whole NumericUtils to use > BytesRef when converting numerics. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org