Jonathan Rochkind [rochk...@jhu.edu] wrote:
> I too sometimes have similar use cases, and my best ideas about how to
> solve them involve using faceting --- you can facet on a multi-valued
> field, and you can sort facets--but you can only sort facets by "index
> order", a strict byte-by-byte sort.  Which doesn't always work for me
> either.  I haven't quite figured out the solution to this sort of problem.

Index ICU CollatorKeys for the terms in a dedicated facet field, then index 
order will be equal to collator order. That is only haft the solution though, 
as the documents still needs to be extracted based on the top X tags in the 
facet. It could be done from outside Solr by iterating the tags and performing 
searches until the wanted number of documents has been resolved, but that seems 
inefficient. A faster way would be to step through the terms for the tags and 
request the docIDs, but that must AFAIK happen inside Solr.

- Toke

Reply via email to