The entity type "Shopify Product" doesn't appear to be compatible with Search API.

SearchApiException while updating the fields of index Test on server Database: Entity type Shopify Product doesn't specify a type for the id property. in SearchApiDbService->fieldsUpdated() (line 718 of /sites/all/modules/search_api_db/service.inc).

SearchApiException: Unknown index search_shopify_producs. in SearchApiDbService->search() (line 1160 of /sites/all/modules/search_api_db/service.inc).

It should be pretty easy to reproduce.

Install the development versions of both: search_api and search_api_db.
Create a server.
Create index using "Shopify Products"
Enable the title field.
Save.

I don't mind taking a stab at fixing it, just need a little info on where to start.

Thanks

Comments

tseven created an issue. See original summary.

donutdan4114’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not sure this is an issue with Shopify module.

The problem is this line in search_api_db/service.inc:1159.

    if (empty($this->options['indexes'][$index->machine_name])) {
      throw new SearchApiException(t('Unknown index @id.', array('@id' => $index->machine_name)));
    }

$this->options['indexes'][$index->machine_name] is empty, but it shouldn't be, and I don't see how the Shopify module would be responsible for that error.

I'm postponing this for now until someone can figure out what the actual issue is.

tseven’s picture

Gotcha.
My original thought was that search_api_db was expecting a value that wasn't being passed/set by the Shopify Product Entity.

Thank you for taking the time to respond.

jonmcl’s picture

Possible solution for this problem submitted at #2858193-2: No property info provided for entity id - affects Search API

bobbygryzynger’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)