Ok. "BOSE", 0, "Walmart", 0, are not a problem because you can heal it by facet.mincount.
"Oracle", 25, seems to be a problem. You need to find which documents provided hits to this facet value. lets add filter parameter fq=company:Oracle and you'll have 25 results which provide this facet value. I suppose you have some unexpected query parser configuration you can check it by specifying debugQuery=true parameter. Also, perhaps the indexing configuration might not be correct eg some document has both companies Apple and Oracle. Once again, facets are counted against the result docset. On Fri, Jan 31, 2014 at 10:17 PM, Kuchekar <kuchekar.nil...@gmail.com>wrote: > Hi Mikhail, > > The Actual result is as following > > "facet_counts": { > "facet_queries": {}, "facet_fields": { "company": [ "Apple", 215, "BOSE", > 0, > "Walmart", 0, "Oracle", 25, > > ... > ... > ... > ... "Microsoft", > 34, "ATT", 45 > ] }, "facet_dates": {}, "facet_ranges": {} } > > > The Expected result would be > > "facet_counts": { > "facet_queries": {}, "facet_fields": { "company": [ "Apple", 215 > ] }, "facet_dates": {}, "facet_ranges": {} } > > Thanks > Kuchekar, Nilesh > > > On Fri, Jan 31, 2014 at 5:24 AM, Mikhail Khludnev < > mkhlud...@griddynamics.com> wrote: > > > On Thu, Jan 30, 2014 at 9:35 PM, Kuchekar <kuchekar.nil...@gmail.com> > > wrote: > > > > > > > > "docs": [ { "id": "ABC123", "company": [ "APPLE" ] }, > > > { "id": "ABC1234", "company": [ "APPLE" ] }, > > > { "id": "ABC1235", "company": [ "APPLE" ] }, > > > { "id": "ABC1236", "company": [ "APPLE" ] } ] }, "facet_counts": { " > > > facet_queries": { "p_company:ucsf\n": 1 }, "facet_fields": { > "company": [ > > > "APPLE", 4, ] }, "facet_dates": {}, "facet_ranges": {} } > > > > > > > Is it your 'expected' result? If it is, please repeat an 'actual' once > > again. I have one idea in mind, please answer to let me confirm my > guess. I > > share my idea after that. > > > > > > -- > > Sincerely yours > > Mikhail Khludnev > > Principal Engineer, > > Grid Dynamics > > > > <http://www.griddynamics.com> > > <mkhlud...@griddynamics.com> > > > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>