Re: Document IDs instead of count for facets?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Document IDs instead of count for facets?

Jan Moszczynski
This is old. Still worth replying, as sometimes somebody might stumble across the same problem.

Well I achieved this rather simply by using facet.pivot. If you define your facet.pivot as “n_cellered_diseaseExact,id” you will get in return the data structure containing pivot list of all diseases, with each disease containing in turn a list of ids of documents matching it. You can control the max length of this id sublist using the facet.limit parameter. It would be useful to set it to some large number, larger, than length of any list You expect. In my case number 200 was sufficient.

So the solution is:


Good luck.