I am using 5.2 and this works:

select?q=*%3A*&wt=csv&indent=true&fl=totaltermfreq(text%2WORDIWANTTOFIND)&rows=1

On Thu, Jun 29, 2017 at 11:52 AM, Kaushik <kaushika...@gmail.com> wrote:

> Thanks to Susheel and Shawn. Unfortunately the Solr version we have is Solr
> 5.3 and it does not include the totaltermfrequency feature. Is there any
> downside of using TermVectorFrequency ; like peformance issues?
>
> On Thu, Jun 29, 2017 at 11:49 AM, Susheel Kumar <susheel2...@gmail.com>
> wrote:
>
> > That's even better. Thanks, Shawn.
> >
> > On Thu, Jun 29, 2017 at 11:45 AM, Shawn Heisey <apa...@elyograg.org>
> > wrote:
> >
> > > On 6/29/2017 8:40 AM, Kaushik wrote:
> > > > We are trying to get the most frequently used words in a collection.
> > > > My understanding is that using facet.field=content_txt. An e.g. of
> > > > content_txt value is "The fox jumped over another fox". In such a
> > > > scenario, I am expecting the facet to return with "fox" and with a
> > > > count value of 2. However, we end up getting "fox" with a value of 1.
> > > > It appears we are getting total number of documents that match the
> > > > query as opposed to the total number of times the word ocurred. How
> > > > can the latter be achieved?
> > >
> > > Facets count the number of documents, not the number of terms.
> > >
> > > You might be after the terms component.
> > >
> > > https://lucene.apache.org/solr/guide/6_6/the-terms-component.html
> > >
> > > This generally works across the entire index, while facets can operate
> > > on documents that match a query.
> > >
> > > Thanks,
> > > Shawn
> > >
> > >
> >
>

Reply via email to