[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Syntax for sorting by a sub-query
From:       Chris Hostetter <hossman_lucene () fucit ! org>
Date:       2013-02-28 19:27:36
Message-ID: alpine.DEB.2.02.1302281115040.20362 () frisbee
[Download RAW message or body]


: > &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})

because it can't be parsed as a query (and is not a field)

Try a simple request like...

   http://yoururl/select?q={qf=worked_companies_im:61}

...and you should also see an error.

the "query()" function is strict about requiring nested local param 
syntax (so you can't just pass an arbitrary query string to it) but in 
your case the input just doesn't make sense.

basd on your problem description, i'm guessing what you want is something 
like...

{!dismax qf=worked_companies_im v=61}
{!lucene f=worked_companies_im v=61}
{!term f=worked_companies_im v=61}

or when used in the query function in a sort...

   sort=query({!term f=worked_companies_im v=61}) desc


-Hoss
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic