Lijo Abraham
Lijo Abraham

Reputation: 881

Issue while faceting in solr

While faceting in solr, I am getting some issue. I am faceting one field named metacategory in my solr and getting the following as result.

<lst name="metacategory">
  <int name="32644_Electronic Accessories">898072</int>
  <int name="87_Fashion">669162</int>
  <int name="337_Home & Kitchen">406689</int>
  <int name="334_Appliances">0</int>

But the issue is solr doesn't even have any docs with 334_Appliances (last one) as metacategory field now. But still it comes in solr while faceting and returning 0. I thought it was cache and restarted my server also. But no use.

Please help.

Upvotes: 0

Views: 28

Answers (1)

Aneesh Mon N
Aneesh Mon N

Reputation: 696

This happens when an deleted doc had a field value "334_Appliances" for field "metacategory".

There is an optimize icon in the core admin screen, if that is done, SOLR will remove the traces of deleted docs. But is very much time expensive.

Also, another option to avoid is to use facet.mincount=1, This will avoid the facets with 0. If this is okay for your business you can use that too.

Upvotes: 1

Related Questions