It would great if some one letme know the difference between the reader(used in solr 1.3) vs the readerKey in solr 3.5, in FieldcacheImpl?
Thanks
Jeyaprakash
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Lucene 2.4 (used by Solr 1.3), the fieldcache internally maintains a
map (reader -> cache)meaning that two different readers will have two different cache instances.This works, but when an index reader is a view over an other index reader, these two instances could safely share the same fieldcache instance and save a lot of memory. This is why, in Lucene 3.5 (used by Solr 3.5),
IndexReadernow has a method to retrieve the cache key (getCoreCacheKey). By default, it returnsthis, leading to the same behavior as with Lucene 2.4, but some implementations override this method to share the field cache instances with otherIndexReaderinstances. For example, it is safe to share the cache between aFilterIndexReaderand the wrappedIndexReader. This is whyFilterIndexReader#getCoreCacheKeyreturns the cache key of the wrappedIndexReader.