You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Hakan karaoğlu <hk...@gmail.com> on 2021/10/06 13:31:54 UTC

How to exclude distinctValues field ?

Hello,

Maybe a small question but I couldn't find the answer. I have a test query
as below. The part I marked in yellow is the 1 month data sample, but as
the date range increases, the list of different Values also increases and
the annual reports expire.
What I want is just the countDistinct value, how can I provide that. In
short, I don't need different Values, I'm only interested in the number.
How can I exclude this distinctValues field or make a distinct query for
the fromid field.

Re: How to exclude distinctValues field ?

Posted by Hakan karao��lu <hk...@gmail.com>.
Hi,

A simple query

"params":{
      "stats.calcdistinct":"true",
      "stats":["on",
        ""],
      "fl":"id,fromid",
      "fq":"feeddate:[2021-01-01T00:00:00Z TO 2021-10-06T00:00:00Z]",
      "sort":"createtime desc",
      "rows":"0",
      "wt":"json",
      "_":"1633528894042",
      "stats.field":"fromid"}},

On 2021/10/06 15:34:03, Nitin Kumar <ni...@gmail.com> wrote: 
> Hi,
> I guess the query is missing.
> Thanks,
> Nitin
> 
> On Wed, Oct 6, 2021 at 9:02 PM Hakan karaoğlu <hk...@gmail.com>
> wrote:
> 
> > Hello,
> >
> > Maybe a small question but I couldn't find the answer. I have a test query
> > as below. The part I marked in yellow is the 1 month data sample, but as
> > the date range increases, the list of different Values also increases and
> > the annual reports expire.
> > What I want is just the countDistinct value, how can I provide that. In
> > short, I don't need different Values, I'm only interested in the number.
> > How can I exclude this distinctValues field or make a distinct query for
> > the fromid field.
> >
> 

Re: How to exclude distinctValues field ?

Posted by Hakan karao��lu <hk...@gmail.com>.
Hi,

A simple query

"params":{
      "stats.calcdistinct":"true",
      "stats":["on",
        ""],
      "fl":"id,fromid",
      "fq":"feeddate:[2021-01-01T00:00:00Z TO 2021-10-06T00:00:00Z]",
      "sort":"createtime desc",
      "rows":"0",
      "wt":"json",
      "_":"1633528894042",
      "stats.field":"fromid"}},

On 2021/10/06 15:34:03, Nitin Kumar <ni...@gmail.com> wrote: 
> Hi,
> I guess the query is missing.
> Thanks,
> Nitin
> 
> On Wed, Oct 6, 2021 at 9:02 PM Hakan karaoğlu <hk...@gmail.com>
> wrote:
> 
> > Hello,
> >
> > Maybe a small question but I couldn't find the answer. I have a test query
> > as below. The part I marked in yellow is the 1 month data sample, but as
> > the date range increases, the list of different Values also increases and
> > the annual reports expire.
> > What I want is just the countDistinct value, how can I provide that. In
> > short, I don't need different Values, I'm only interested in the number.
> > How can I exclude this distinctValues field or make a distinct query for
> > the fromid field.
> >
> 

Re: How to exclude distinctValues field ?

Posted by Nitin Kumar <ni...@gmail.com>.
Hi,
I guess the query is missing.
Thanks,
Nitin

On Wed, Oct 6, 2021 at 9:02 PM Hakan karaoğlu <hk...@gmail.com>
wrote:

> Hello,
>
> Maybe a small question but I couldn't find the answer. I have a test query
> as below. The part I marked in yellow is the 1 month data sample, but as
> the date range increases, the list of different Values also increases and
> the annual reports expire.
> What I want is just the countDistinct value, how can I provide that. In
> short, I don't need different Values, I'm only interested in the number.
> How can I exclude this distinctValues field or make a distinct query for
> the fromid field.
>