I'm using solr 4.0 in a project and I need to sort the results based on whether
they match another filter.
e.g. I have a "worked_companies" multi-integer field that contains the list of
company ids some person has worked with before. I have a series of other fq=
filters to narrow down the list of users and I want to put the users
containing, say, 61 in that worked_companies before users that don't have it.
I've tried various incarnations of this.
> &sort=query({qf=worked_companies_im:61})
which yields
> Can't determine a Sort Order (asc or desc) in sort spec
> 'query({qf=worked_companies_im:61})', pos=34
So I added desc
> &sort=query({qf=worked_companies_im:61}) desc
which yields
> sort param could not be parsed as a query, and is not a field that exists in
> the index: query({qf=worked_companies_im:61})
Any ideas on how to accomplish what I'm trying to do, and how I'm to word the
sort function would be extremely appreciated..
Edward Rudd
OutOfOrder.cc
Skype: outoforder_cc