I'm working on replacing a custom, internal search implementation with
Solr.  I'm having great success, with one small exception.

When implementing our version of faceting, one of our facets had a
peculiar sort order.  It was dictated by the order in which the field
occurred in the results.  The first time a value occurred it was added
to the list and regardless of the number of times it occurred, it
always stayed at the top.

For example, if a search yielded 10 results, 1 - 10, and hit 1 is in
category 'Toys', hit 2 through 9 are in 'Sports' and the last is in
'Household' then the facet would look like:

facet.fields -> category -> [ Toys: 1, Sports: 8 Household: 1 ]

The facet.sort only gives me the option to sort highest count first or
alphabetically.

So, the question I _really_ have is: how can I implement this feature?
 I could examine the results i'm returned and create my own facet
order from it, but I thought this might be useful for others.  I don't
know my way around Solr's source, so I though dropping a note to the
list would be faster than code spelunking with no light.

-- 
Cory 'G' Watson
http://www.onemogin.com

Reply via email to