Quick update: the NPE was related to the way in which I passed params into the Query via solrconfig.xml. It works fine for single sharded, but something about it was masking the unique ID field in a multisharded environment. Anyway, I was able to fix that by cleaning up the request handler config:
<requestHandler name="/aggr" class="solr.SearchHandler"> <lst name="appends"> <str name="fq">{!AggregationPostFilter count=Count spend=INVOICE_AMOUNT}</str> <str name="fl">[AggregationStats]</str> </lst> </requestHandler> Now my post filter completes without errors (!) but it doesn't work - it returns every single document specified by the query (q) param. It isn't aggregating. (Broken record) It still works correctly on a single shard collection. With this query, it should do exactly what the collapsing filter does (and yes, that works perfectly): .../aggr?q=*:*&fl=VENDOR_NAME&sort=VENDOR_NAME+asc -- View this message in context: http://lucene.472066.n3.nabble.com/AnalyticsQuery-fails-on-a-sharded-collection-tp4289274p4291190.html Sent from the Solr - User mailing list archive at Nabble.com.