1

Using Commerce Kickstart 2

Having a situation where certain Products simply do not appear in the Search results. Is there a way to troubleshoot specifically -why- certain products (or other content) are not appearing in the search index?

I looked through the search_api_db_product_display table and sure enough, the missing node is -not- there.

So: Is there a log or table which displays each node and index term and/or -why- a particular node was included/excluded?

Just to be clear: If I enter the URL for the Product directly, it displays fine.

ALSO: I can search from admin/commerce/products and the Product shows up as well as from admin/content.

Perhaps related: There seems to be a known issue where adding new products does not automatically update the index. But I have cleared the index and rebuilt several times and it makes no difference.

2
  • I don't know specifically about your set up, but many modules only run a certain number of updates - 'rebuilding' doesn't always mean it searches through everything on the site, it could be maxing out, allowing the rest to happen naturally via cron - try running cron a dozen times or so and see if that improves things...
    – Geoff
    Apr 24 '15 at 20:25
  • Thanks. I've croned, re-indexed, done a rain dance... nothing. The product just isn't appearing in the search_api_db_product_display table.
    – jchwebdev
    Apr 24 '15 at 22:18
0

Not sure if this is proper 'etiquette' but here is the solution for -this- problem:

My Product Display has an Entity field which displays a list of 'related products' -- a common enough situation in a Shopping Cart system. The related products are a View which displays products linked to the parent product NID.

Like most sites, I imagine, the Index excludes unpublished products.

Apparently if any one of the Related Products is unPublished, this affects the Commerce and/or SOLR Search index for the -Parent- product. IOW: if any child product is unPublished the index skips the -parent- product as being 'unpublished'.

Not sure which module is at the root of this... or who to notify... but if the Commerce Guys monitor, this is a real 'gotcha'. I've run into this many times in Drupal where SQL Queries are not 'isolated' from one another... ie. a child view will affect a parent query.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.