So I notice if I create the simplest MergeStrategy I can get my test values from the shard responses and then if I add info to the SolrQueryResponse it gets back to the caller. I still must be missing something. I wouldn't expect to have different code paths - one for single shard one for multi shard. So if the PostFilter is restricting the documents returned, what's the correct way to return my analytics info? Should I not be adding data to the SolrQueryResponse from within the delegating collector's finish() method? Here's what I'm trying to do (still works fine with a single shard collection :)
- Use the DelegatingCollector to restrict docs returned (dropping docs that are "duplicates" based on my critieria) - Calculate 2 stats for each collected doc: a count of "duplicate" docs & a sum on a number field from these "duplicate" docs. I am doing the math in the collect() method. - Return the stats in the response stream. I'm using a TransformerFactory now to inject a new field into the results for each doc. Should I be using a SearchComponent instead? Erick Erickson wrote > Right, I don't have the code in front of me right now, but I think > your issue is at the "aggregation" point. You also have to put > some code in the aggregation bits that pull your custom parts > from the sub-request packets and puts in the final packet, > "doing the right thing" in terms of assembling them into > something meaningful along the way (e.g. averaging "myvar" > or putting it in a list identified by shard or......). > > I think if you fire the query at one of your shards with &distrib=false > you'll see your additions, which would demonstrate that your > filter is being found. I assume your custom jar is on the shards > or you'd get an exception (assuming you've pushed your > solrconfig to ZK). > > Best, > Erick -- View this message in context: http://lucene.472066.n3.nabble.com/QParsePlugin-not-working-on-sharded-collection-tp4290249p4290285.html Sent from the Solr - User mailing list archive at Nabble.com.