Since upgrade from beta13 to beta15 (Drupal7 module) I periodically get 2 Messages from
Apache Solr (with each cron job)

1st is a Warning:
Cron läuft mit apachesolr_nodeapi_mass_update() für die Beitrags-IDs 480,442,481

2nd is an Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'nid' in 'where clause'

I cleared Cache from the Site an the Views Cache. I copied the new files from apachesolr module folder to the solr Server config. (schema.xml, stopwords.txt, etc.)

The IDs 480, 481, 442 are published Content.

Can anybody help me with these informations?

CommentFileSizeAuthor
#1 1405040-1.patch2.47 KBnick_vh

Comments

nick_vh’s picture

StatusFileSize
new2.47 KB

Does this help? I assume you are using another database type?

nick_vh’s picture

Status: Active » Needs review
chrisssi’s picture

Hi Nick_vh

thank you for this patch. I've patched the apachesolr.index.inc and after that I cleared again all Caches.

Then I added a node type = article. After that I still saw Remaining 0 Elements under Apache Solr Search Configuration and in the log file was an entry

Cron runs with apachesolr_nodeapi_mass_update() for ....IDs 495

where ID 495 = ID of this last added article.

But only the warning resists - no Errors (like above).

After another Cron the Indexed Items were counted +1 so the new Index Entree has been added to the Index. (fine!)

:-)

So the patch is working. But I'm not sure what I can do about the still existing Warning from Apache Solr.

Can it be ignored or is there anything a noob like me can do?

nick_vh’s picture

I can't seem to reproduce the notice so I'd love some more information. Can you tell me what database type you are working on and possibly can you give me the english version of those warnings?

chrisssi’s picture

The Database for the Drupal CMS is

MySQL - MyISAM (v 5.1.58)

on ubuntu Server 11.10
+ PHP (v 5.3.6-13ubuntu3.3)

The Java Server for Apache Solr is a

Tomcat 7.0.23 with Solr 3.5.0

on another ubuntu Server 11.10.

The Message is:

Type: Apache Solr
User: Anonymous (not verified)
Location: http://www.mysite.com/cron.php?cron_key={cron_key}
Message: On cron running apachesolr_nodeapi_mass_update() on nids {IDs_of_all_added_items_since_last_cronjob}
Severity: Warning

Hope these Infos help a bit. Allthough the Warning appears, the IDs of the mentioned Items disappear after the cronjob. So only the IDs of newly added Items where included in following Warning after next cron.
Before using your patch the List of IDs of the Non-indexed Items mentioned in the Apache Solr Warning accumulated because of the SQL Error.
Sorry I can't better describe it....

Btw when deleting an Item is working properly i think.
After deleting a node I see the Number of Pending Deletions directly under the Settings of Apache Solr.

nick_vh’s picture

Ah, I see now. This is actually perfectly ok behavior. Nothing to worry about.

foreach ($node_lists as $nodes) {
    watchdog('Apache Solr', 'On cron running apachesolr_nodeapi_mass_update() on nids @nids', array('@nids' => implode(',', array_keys($nodes))), WATCHDOG_WARNING);
    if (!apachesolr_nodeapi_mass_update($nodes)) {
      // Solr query failed - so stop trying.
      break;
    }

You can safely ignore it!

chrisssi’s picture

Thanks for your help!

A last question - Is it possible to make the Counter for Pending Updates / Remaining (when new nodes are posted) again working?
But it's a "nice-to-have" so if not it's not a Doomsday !

:-)

nick_vh’s picture

This counter should work? I suggest you open a new issue and you clearly write down what you do (and which modules) so the counter stopped working

nick_vh’s picture

Status: Needs review » Reviewed & tested by the community
nick_vh’s picture

Status: Reviewed & tested by the community » Patch (to be ported)
nick_vh’s picture

Version: 7.x-1.0-beta15 » 6.x-3.x-dev

Committed for 7.x-1.x

nick_vh’s picture

Version: 6.x-3.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Fixed

Does not affect 6.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

periodic = cron jobs running