I've built a Drupal 7 commerce shop which holds more than 4000 products (successfully imported from a Joomla Vmart website using Feeds module). I've created lots of different taxonomy fields for product displays, referring to different taxonomy vocabularies used to descrtibe certain product attributes (e.g. company, materials used, etc). I'm also using Sorts and Facets to provide related functionalities to users.

The problem I'm currently facing is that when I try to index the website's products only a partial indexing is done: "About 28% of all items have been indexed in their latest version (1195 / 4138)." That is what Progress reports on indexing page (http://mywebsite.com/admin/config/search/search_api/index/default_node_i...)

Also, the notice displayed on top of the page is: "695 items could not be indexed. Check the logs for details." and the logs are full of these two kinds of warnings:
1. "Warning: Invalid argument supplied for foreach() at SearchApiDbService->indexItem() (Line 342 of /website_root/sites/all/modules/search_api_db/service.inc)."
2. "A string value longer than 255 characters was encountered. Such values currently aren't supported by the database backend." I believe that this second warning is related to a problem that search api + database search have in indexing product displays' body.

What also seems to be strange is that 695 + 1195 = 1890, which is way smaller than 4138 which is the total number of products / product displays I have on my website. Finally, as all this wasn't enough, sometimes I have problems indexing and re-indexing my products as the process gets imterrupted with a 500 error.

Any guesses on how to solve all these issues?? I really need some guidance here on where to start from...!

Comments

Demoshane’s picture

Is your field full text or string? If it's string you could try changing it to full text and reindexing.

ioanmar’s picture

Body is added as Fulltext already but:
- About 96% of all items have been indexed in their latest version (3895 / 4054), according to admin/config/search/search_api/index/default_node_index/status.
- I've discovered many of the products that cannot get indexed but I still can't find the reason. I'm trying to find a pattern here but it's not possible.
- Also, some products are not visible on facet result pages but only through search, isn't that strange???

lsolesen’s picture

Status: Active » Postponed (maintainer needs more info)

Could you please try with the latest code base?