Using the DB backend, I get 0/0 indexed items. Both for nodes as for custom entities. If I save an entity, the fields get indexed though. Overview page will still say 0/0.

CommentFileSizeAuthor
#9 2609200-9-indexing-skipped.patch613 byteschristianadamski

Comments

ChristianAdamski created an issue. See original summary.

christianadamski’s picture

search_api_item table is empty.

nick_vh’s picture

Status: Active » Postponed (maintainer needs more info)

It is working here. Can you please post steps to reproduce?

christianadamski’s picture

Status: Postponed (maintainer needs more info) » Active

Not much to say. Using the latest Dev-release, my existing two indexes for custom entites would simply show 0/0 after clearing the existing index. I went on to completely delete server and indexes and just used a Server with default settings and an index for all nodes (there were some) and I still got 0/0.

When the custom indexes where still there, I saved an entity and saw the fields correctly showing up in there respective search_api_xx tables, but search_api_item stayed empty.

I did a complete drush un-install and enable of search_api. Drush updatedb was also executed. Monday I will try a complete re-install of Drupal as a whole.

christianadamski’s picture

Status: Active » Closed (works as designed)

After a complete reinstall, it seems to work fine again. No idea what the issue was.

christianadamski’s picture

I am now at the same situation again. I could already track this down to

datasource/ContentEntity.php line 513 'tracking_page_size' getsing assigned NULL.

Which creates a select Query with range 0:0 which results in 0 items.

$page_size = $this->getConfigValue('tracking_page_size');
$select->range($page * $page_size, $page_size);

christianadamski’s picture

Status: Closed (works as designed) » Active
christianadamski’s picture

Okay, I think I found the issue:

datasource/ContentEntity.php line 512 is if(isset($page)) ...

However: $page might be '0' at this point, which does evaluate as 'isset' but will cause an empty range.

Replacing the if(isset($page)) instead with if(!empty($page)) makes the thing work.

But: I have issues indexing right now for different reasons. Those things might be related. I will keep checking.

christianadamski’s picture

StatusFileSize
new613 bytes

A one-line-patch attached.

christianadamski’s picture

Status: Active » Needs review
drunken monkey’s picture

Status: Needs review » Needs work

The issue is probably just that you updated to the latest module version, which contains a new configuration setting (tracking_page_size) whose default won't get set automatically this way.
Try executing the following (just need to do it once):

\Drupal::configFactory()->getEditable('search_api.settings')->set('tracking_page_size', 100)->save();

As noted with the releases, in Alpha stage there is no update path provided yet, so such doing things manually becomes necessary from time to time.
(If this fixes the issue for you, please set to "Closed (works as designed)".)

christianadamski’s picture

Cache has been rebuild with later versions already, including the latest. So I can't test this anymore.

Assume this fixed.

borisson_’s picture

Status: Needs work » Closed (works as designed)

Awesome, thanks for confirming @ChristianAdamski. Closing this issue.

geerlingguy’s picture

I can confirm this (#11) fixed the issue on a site running alpha14 (and not yet upgraded to a later version). Thanks for posting the fix!