Since you already have the top x items then, wouldn't it be much easier to collect the "facet" data from the result list on your own?
Am 17.02.2017 um 10:18 schrieb Zheng Lin Edwin Yeo: > Hi Michael, > > Yes, I only want the JSON Facet to query based on the returned result set > of the itemNo from the 1st query. > > There's definitely more than the 10, but we just need the top 10 in this > case. As the top 10 itemNo may change, so we have to get the returned > result set of the itemNo each time we want to do the JSON Facet. > > Regards, > Edwin > > > On 17 February 2017 at 15:42, Michael Kuhlmann <k...@solr.info> wrote: > >> So basically you want faceting only on the returned result set? >> >> I doubt that this is possible without additional queries. The issue is >> that faceting and result collecting is done within one iteration, so >> when some document (actually the document's internal id) is fetched as a >> possible result item, you can't determine whether this will make it into >> the top x elements or not since there will come more. >> >> -Michael >> >> Am 17.02.2017 um 05:00 schrieb Zheng Lin Edwin Yeo: >>> Hi, >>> >>> Would like to check, is it possible to do a select of say TOP 10 items >> from >>> Solr query, and use the list of the items to do another query (Eg: JSON >>> Facet)? >>> >>> Currently, I'm using a normal facet to retrieve the list of the TOP 10 >> item >>> from the normal faceting. >>> After which, I have to list out all the 10 items as a filter when I do >> the >>> JSON Facet like this >>> q=itemNo:(001 002 003 004 005 006 007 008 009 010) >>> >>> It will help if I can combine both of this into a single query. >>> >>> I'm using Solr 6.4.1 >>> >>> Regards, >>> Edwin >>> >>