When drupal sends a $op='reset' message to hook_search, this mdoule fails to reset Solr's indexes. Here is a patch to fix that.
Patch applied from module's directory.
| Comment | File | Size | Author |
|---|---|---|---|
| apache-solr-reset.patch | 881 bytes | mattconnolly |
When drupal sends a $op='reset' message to hook_search, this mdoule fails to reset Solr's indexes. Here is a patch to fix that.
Patch applied from module's directory.
| Comment | File | Size | Author |
|---|---|---|---|
| apache-solr-reset.patch | 881 bytes | mattconnolly |
Comments
Comment #1
drunken monkeyI think it doesn't do that because it shouldn't. If 'reset' is sent, according to the specification at http://api.drupal.org/api/function/hook_search/6 the index should be rebuilt, but I don't think it should be wiped, just updated. This is also indicated by the text you get when accessing this function at admin/settings/search/wipe:
But many thanks for clearing up #271319: This patch provides a Delete Index button for Solr!
Comment #2
senpai commented#1 is correct. We shouldn't delete all of SOLR's cache with the Drupal re-index site button. I vote -1 on this patch as it's currently written, but would like to see some more integration between Drupal buttons and SOLR's capabilities. I wonder if you might try rebuilding the SOLR index if the admin/settings/search/wipe form is submitted. Does SOLR even have an API function for reindexing vs. deletion?
Comment #3
drunken monkeyIn this case, the issue should be marked "won't fix" or "by design", rather than "needs work", I think. Other functionality would be a different issue, after all.
If I understand you correctly, that's exactly what's happening at the moment. The variables for the last added node are reset, so at the next cron run, the nodes 1-100 will be reindexed. Solr automatically does this, when sent a document with the same unique key (nid in our case) as an existing one. The nodes that already are in the index will still be found all the while. A delete is currently only carried out, if the corresponding node is deleted, afaik.
Comment #4
robertdouglass commentedAgree with drunken monkey. This is the way Drupal's core index works and I'd like to keep the functionality. Further discussion should happen at #271319.