I have had a look through some of the previous issues and can only see this issue for Drupal 6. I have had a look through the comments and have not been able to fix this issue.
When I tell ApacheSolr to index my site it fails right at the end of the batch process with the following
XXXX items successfully processed. An error occurred while processing apachesolr_batch_index_nodes with arguments :apachesolr_batch_index_nodes
The weird thing is that it says I have over 50,000 items in the index but also says that only a small percentage of the site has been indexed. The total of the two numbers add up to way more content than I have.
Can anyone help me so I can work out where the issue is with the indexing not working.
I did recently update to version 7 and it had been working prior. I have deleted the whole index and made sure that my schema and config files are up-to-date.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1174960-10.patch | 2.41 KB | pwolanin |
Comments
Comment #1
akoepke CreditAttribution: akoepke commentedJust deleted the index and told it to reindex.
Comment #2
akoepke CreditAttribution: akoepke commentedJust providing a further update. I reverted back to Beta 6 (which comes with a Beta 4 schema) and the indexing did complete.
It still came up with the error but in this case it did still index the content. After the initial run there were only 213 articles not in the index and re-running the index queued content process resolved those.
Some change between Beta 6 and Beta 7 caused this to stop working.
Comment #3
jpmckinney CreditAttribution: jpmckinney commentedDid you run update.php? That's likely the problem.
Comment #4
vabue CreditAttribution: vabue commentedSame problem, beta7.
Running update.php don't help.
Comment #5
jpmckinney CreditAttribution: jpmckinney commented@akoepke: does running update.php not help you either?
Comment #6
akoepke CreditAttribution: akoepke commentedThe update did run and did not help with this problem. The first time I did the upgrade I did it via the D7 module upgrade system and did run the database updates afterwards.
The second time I tried it I did the upgrade via drush (made it easier to revert back) which automatically applies the database updates.
Comment #7
jpmckinney CreditAttribution: jpmckinney commentedThe message in the OP appears on the admin page. Are there no other messages in the watchdog logs? Common errors during indexing are caught and logged there.
Comment #8
pwolanin CreditAttribution: pwolanin commentedWhere in the code is that error message generated?
It could be a SQL query that's very slow and fails.
Comment #9
jpmckinney CreditAttribution: jpmckinney commented"An error occurred while processing apachesolr_batch_index_nodes with arguments" is in apachesolr_batch_index_finished.
Comment #10
pwolanin CreditAttribution: pwolanin commentedUgh, this was annoying. So we added back the use of apachesolr_cron_check_node_table() on cron last release. Seems there was an unnoticed bug in that DBTNG ->condition() CANNOT be used to compare 2 columns, only a column and a value.
To compare 2 columns, looks like you have to use ->where()
So, the real fix is one line:
but this patch also has some cleanup to get rid of silly code that can be replaced by appropriate use of array_chunk().
Comment #11
pwolanin CreditAttribution: pwolanin commentedComment #12
pwolanin CreditAttribution: pwolanin commentedComment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribe, review shortly.
Comment #14
Anonymous (not verified) CreditAttribution: Anonymous commentedthis looks RTBC to me.
code cleanup is nice, and i can confirm this patch fixes the indexing bug.
Comment #15
pwolanin CreditAttribution: pwolanin commentedcommitted. Thanks @justinrandell
Comment #16
exeapps CreditAttribution: exeapps commentedExcellent.