lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank li <fudon...@gmail.com>
Subject Re: JSON Facet & Analytics API in Solr 5.1
Date Fri, 08 May 2015 14:26:10 GMT
Hi Yonik,

Any update for the question?

Thanks in advance,

Frank

On Thu, May 7, 2015 at 2:49 PM, Frank li <fudongli@gmail.com> wrote:

> Is there any book to read so I won't ask such dummy questions? Thanks.
>
> On Thu, May 7, 2015 at 2:32 PM, Frank li <fudongli@gmail.com> wrote:
>
>> This one does not have problem, but how do I include "sort" in this facet
>> query. Basically, I want to write a solr query which can sort the facet
>> count ascending. Something like "http://localhost:8983/solr
>> /demo/query?q=apple&json.facet={field=price sort='count asc'}
>> <http://localhost:8983/solr/demo/query?q=apple&json.facet=%7Bx:%27avg%28price%29%27%7D>
>>
>> I really appreciate your help.
>>
>> Frank
>>
>>
>> <http://localhost:8983/solr/demo/query?q=apple&json.facet=%7Bx:%27avg%28price%29%27%7D>
>>
>> On Thu, May 7, 2015 at 2:24 PM, Yonik Seeley <yseeley@gmail.com> wrote:
>>
>>> On Thu, May 7, 2015 at 4:47 PM, Frank li <fudongli@gmail.com> wrote:
>>> > Hi Yonik,
>>> >
>>> > I am reading your blog. It is helpful. One question for you, for
>>> following
>>> > example,
>>> >
>>> > curl http://localhost:8983/solr/query -d 'q=*:*&rows=0&
>>> >  json.facet={
>>> >    categories:{
>>> >      type : terms,
>>> >      field : cat,
>>> >      sort : { x : desc},
>>> >      facet:{
>>> >        x : "avg(price)",
>>> >        y : "sum(price)"
>>> >      }
>>> >    }
>>> >  }
>>> > '
>>> >
>>> >
>>> > If I want to write it in the format of this:
>>> >
>>> http://localhost:8983/solr/query?q=apple&json.facet={x:'avg(campaign_ult_defendant_cnt_is)'}
>>> ,
>>> > how do I do?
>>>
>>> What problems do you encounter when you try that?
>>>
>>> If you try that URL with curl, be aware that curly braces {} are
>>> special globbing characters in curl.  Turn them off with the "-g"
>>> option:
>>>
>>> curl -g "
>>> http://localhost:8983/solr/demo/query?q=apple&json.facet={x:'avg(price)'}
>>> "
>>>
>>> -Yonik
>>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message