From: Beyene, Iyob <ibey...@gannett.com> Sent: Tuesday, September 27, 2016 11:22 AM To: solr-user Subject: Re: Faceting search issues
Here is the result from running the first query, i.e http://localhost:8983/solr/core/select?q=*:*&facet=true&facet.field=name&rows=0&facet.mincount=2&echoParams=all<http://localhost:8983/solr/core/select?q=*:*&facet=true&facet.field=name&fq=aggregatename:story&rows=0&facet.mincount=2&echoParams=all<http://localhost:8983/solr/core/select?q=*:*&facet=true&facet.field=name&rows=0&facet.mincount=2&echoParams=all%3Chttp://localhost:8983/solr/core/select?q=*:*&facet=true&facet.field=name&fq=aggregatename:story&rows=0&facet.mincount=2&echoParams=all>> {"responseHeader": {"status": 0,"QTime": 460,"params": {"q": "*:*","facet.field": "name","df": "text","echoParams": "all","facet.mincount": "2", "collection": "core","rows": "0","facet": "true","wt": "json"}},"response": {"numFound": 318828,"start": 0,"maxScore": 1,"docs": []},"facet_counts": {"facet_queries": {},"facet_fields": {"id": []},"facet_dates": {},"facet_ranges": {},"facet_intervals": {},"facet_heatmaps": {}}}, and the second one: http://localhost:8983/solr/core/select?q=*:*&facet=true&facet.field=name&rows=0&facet.mincount=2&echoParams=all&fq=name:elephant {"responseHeader": {"status": 0,"QTime": 353,"params": {"q": "*:*","facet.field": "name","df": "text","echoParams": "all","facet.mincount": "2", "collection": "core","rows": "0","facet": "true","wt": "json"}},"response": {"numFound": 2,"start": 0,"maxScore": 1,"docs": []},"facet_counts": {"facet_queries": {},"facet_fields": {"name": ["elephant",4]},"facet_dates": {},"facet_ranges": {},"facet_intervals": {},"facet_heatmaps": {}}} Yes I have that many docs indexed. Thanks ________________________________ ________________________________ From: Alexandre Rafalovitch <arafa...@gmail.com> Sent: Tuesday, September 27, 2016 10:36:19 AM To: solr-user Subject: Re: Faceting search issues That's weird. Could you rerun both queries with echoParams=all and see if some additional conditions will show up unexpectedly. Specifically, an 'fq' in the first query that the second query overrides. Alternatively, do you definitely have 316544 documents in the index? That's the number that's your supposed "return all documents" query gives. Regards, Alex. ---- Newsletter and resources for Solr beginners and intermediates: http://www.solr-start.com/ On 27 September 2016 at 21:26, Beyene, Iyob <ibey...@gannett.com> wrote: > > Alessandro, thanks for your quick reply. > > When I say duplicates I meant to say how many documents the term appears in. > > All that I wanted to see is the number of times a particular name is > appearing in documents in solr. > > thanks > > > ________________________________ > From: Alessandro Benedetti <abenede...@apache.org> > Sent: Tuesday, September 27, 2016 5:30:38 AM > To: solr-user@lucene.apache.org > Subject: Re: Faceting search issues > > When you say "check for duplicates" what do you mean ? no duplicate tokens > are in the index per field. > What is your definition of duplicate for a term? Do you consider lowercase > and uppercase version duplicate ? > Maybe you have an analysis problem. > > MinCount=2 means : "include only terms appearing at least in 2 documents in > the result set . > > Cheers > > > > On Mon, Sep 26, 2016 at 10:59 PM, Beyene, Iyob <ibey...@gannett.com> wrote: > >> Hi, >> >> When I query solr using faceted search to check for duplicates using the >> following , >> >> 'http://localhost<http://localhost>:8983/solr/core/ >> select?q=*:*&facet=true&facet.field=name&facet.mincount=2`, >> >> I get the following response with no facet data. >> >> >> {"responseHeader": {"status": 0,"QTime": 541,"params": {"q": "*:*", >> "facet.field": "name","facet.mincount": "2","rows": "0","facet": >> "true"}},"response": {"numFound": 316544,"start": 0,"maxScore": 1,"docs": >> []},"facet_counts": {"facet_queries": {},"facet_fields": {"name": >> []},"facet_dates": {},"facet_ranges": {},"facet_intervals": >> {},"facet_heatmaps": {}}} >> >> >> but when I specify the name in fq >> >> 'http://localhost<http://localhost/>:8983/solr/core/ >> select?q=*:*&facet=true&facet.field=name&facet.mincount=2& >> fq=name:elephant` >> >> I get a facet result like these >> >> {"responseHeader": {"status": 0,"QTime": 541,"params": {"q": >> "*:*","facet.field": "name","fq": "name:elephant","facet.mincount": >> "2","rows": "0","facet": "true"}},"response": {"numFound": 2,"start": >> 0,"maxScore": 1,"docs": []},"facet_counts": {"facet_queries": >> {},"facet_fields": {"name": ["elephant",4]},"facet_dates": >> {},"facet_ranges": {},"facet_intervals": {},"facet_heatmaps": {}}} >> >> >> The field I am basing the facet search on is defined like below >> >> <field name="name" type="string_ci" indexed="true" stored="true" >> required="true" multiValued="true"/> >> >> >> Is there some variation of faceting that could help me analyze the >> difference? >> >> Thanks >> >> Iyob >> >> >> >> >> >> > > > -- > -------------------------- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England