
lins at softomatix
Jul 24, 2012, 6:10 AM
Post #2 of 2
(167 views)
Permalink
|
|
Re: Lucene 3.6: FieldCache.DEFAULT.getStrings returns array of nulls for some fields
[In reply to]
|
|
Solved. As written in chapter 5 I have to index the fields if I want to retrieve them using the field cache. Am 24.07.2012 13:10, schrieb Oliver: > Hello Everyone, > > I am developing an application with Lucene 3.6 (Java). > I am using a NRTManager to ensure I find the (nearly) newest changes in the index. > I use BooleanQuery containing NumericRangeQuery as BooleanClause(s) (I use 4 of these BooleanClause(s)). > With my custom Sort implementation everything seems to work fine. > > Now I want to create a custom collector to control the returned documents. Having read parts > of the book Lucene in action 2010 (page 212) I tried to retrieve the values for the fields > while the method > > setNextReader(IndexReader reader, int docBase) > > is called in my custom collector and store the arrays to access them in collect (int doc). > > The samples in the book show the way to do so (e.g): > > String[] urls = FieldCache.DEFAULT.getStrings (reader, "field name"); > > The problem is that the call returns arrays containing 'null' as values for some fields. > Even if I am quite sure that there are values for the fields. > Other fields are filled as expected. > > Am I missing something or has the way to retrieve the values changed between 2.9 and 3.6 and does not work anymore in 3.6? > > Thanks, > > Oliver > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe [at] lucene > For additional commands, e-mail: java-user-help [at] lucene > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe [at] lucene For additional commands, e-mail: java-user-help [at] lucene
|