[ https://issues.apache.org/jira/browse/LUCENE-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated LUCENE-2671: ---------------------------------- Attachment: LUCENE-2671-caches.patch This patch reduces the number of compiler warnings by removing a Map and replacing it with specific classes. That is rather then: {code:java} private Map<Class<?>,Cache> caches; {code} we would have {code:java} private Cache<ByteValues> byteCache; private Cache<ShortValues> shortCache; private Cache<IntValues> intCache; private Cache<FloatValues> floatCache; private Cache<LongValues> longCache; private Cache<DoubleValues> doubleCache; private Cache<DocTermsIndex> docTermsIndexCache; private Cache<DocTerms> docTermsCache; private final List<Cache<?>> caches = new ArrayList<Cache<?>>(); {code} and then each type looks up its values directly: {code:java} public IntValues getInts(IndexReader reader, String field, EntryCreator<IntValues> creator ) throws IOException { return intCache.get(reader, new Entry<IntValues>(field, creator)); } {code} However, this approach still leaves one place that has class cast. since the Cache holds a CreationPlaceholder while it is making the object, we can not use a simple generic Map. Again, we could add some extra instanceof checks, but I don't think that adds anything > Add sort missing first/last ability to SortField and ValueComparator > -------------------------------------------------------------------- > > Key: LUCENE-2671 > URL: https://issues.apache.org/jira/browse/LUCENE-2671 > Project: Lucene - Java > Issue Type: New Feature > Components: Search > Reporter: Ryan McKinley > Assignee: Ryan McKinley > Fix For: 4.0 > > Attachments: LUCENE-2671-caches.patch, > LUCENE-2671-SortMissingLast.patch, LUCENE-2671-suppress-unchecked.patch > > > When SortField and ValueComparator use EntryCreators (from LUCENE-2649) they > use a special sort value when the field is missing. > This enables lucene to implement 'sort missing last' or 'sort missing first' > for numeric values from the FieldCache. -- 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: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org