lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tedsolr <>
Subject Re: How to return custom collector info
Date Tue, 20 Jan 2015 19:06:09 GMT

Thank you for the links. The AnalyticsQuery is just the thing I need to
return custom stats in the response.

What I'm struggling with now, is how to read the doc field values. I've been
following the CollapsingQParserPlugin model of accessing the field cache in
the Query class getAnalyticsCollector() method, then passing the values to
the delegating collector. Every time I try to read what I assume is a field
value I get a NoSuchMethodError:

(in the getAnalyticsCollector() method ...)
BinaryDocValues fieldValues =
FieldCache.DEFAULT.getTerms(searcher.getAtomicReader(), "ID", false);
("ID" happens to be my uniqueKey in the schema.xml - its a string that is
stored and indexed and single valued)

(in the Collector ...)
BytesRef bRef = new BytesRef();
fieldValues.get(doc, bRef); // this line throws the error

I of course do not want to read stored values in the collector() method, so
where have I gone wrong trying to read the field cache (or doc values - I
have not tried to enable them and am not sure how to do so)?

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message