lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Lins <>
Subject Lucene 3.6: FieldCache.DEFAULT.getStrings returns array of nulls for some fields
Date Tue, 24 Jul 2012 11:10:24 GMT
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?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message