On Wed, Aug 10, 2011 at 5:57 AM, Amit Sawhney <sawhney.a...@gmail.com> wrote:
> Hi All,
>
> I am trying to sort the results on a unix timestamp using this query.
>
> http://url.com:8983/solr/db/select/?indent=on&version=2.1&q={!frange%20l=0.25}query($qq)&qq=nokia&sort=unix-timestamp%20desc&start=0&rows=10&qt=dismax&wt=dismax&fl=*,score&hl=on&hl.snippets=1
>
> When I run this query, it says 'no field name specified in query and no 
> defaultSearchField defined in schema.xml'


The default query type for embedded queries is "lucene".   so your
qq=nokia is equivalent to qq={!lucene}nokia

So one way is to explicitly make it dismax:
   qq={!dismax}nokia
Another way is to declare the sub-query to be of type dismax:
  q={!frange l=0.25}query({!dismax v=$qq})&qq=nokia

-Yonik
http://www.lucidimagination.com


> As soon as I remove the frange query and run this, it starts working fine.
>
> http://url.com:8983/solr/db/select/?indent=on&version=2.1&q=nokia&sort=unix-timestamp%20desc&start=0&rows=10&qt=dismax&wt=dismax&fl=*,score&hl=on&hl.snippets=1
>
> Any pointers?
>
>
> Thanks,
> Amit

Reply via email to