We have drush solr-delete-index to delete the index.
We have drush solr-reindex to mark content for reindexing.
But we can't tell our system from drush to index all remaining content. This patch provides the drush solr-index command to do so.

Comments

cfennell’s picture

I found myself doing the same thing, makes sense to me to include this as a feature, and it's a pretty trivial change. This patch applied cleanly and worked as expected.

mirzu’s picture

This patch applied cleanly and is a great addition to solr. Makes indexing large numbers of nodes much simpler than without. Just indexed 10k nodes in the time it took to get a beer from the corner store. :)

twom’s picture

Just successfully tested the patch on 44k nodes.
This would be a great addition to the drush file.

davyvdb’s picture

Status: Needs review » Reviewed & tested by the community

I'm marking this RTBC since it's pretty trivial and tested by at least 3 people.

pwolanin’s picture

Status: Reviewed & tested by the community » Needs work

need a unified diff, please.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new2.78 KB
jaydub’s picture

Patch applies cleanly and indexing is working via Drush as we speak against 2.0-beta3 release.

jpmckinney’s picture

Status: Needs review » Fixed

Fixed in 6.1, 6.2 and 7

Status: Fixed » Closed (fixed)

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

frankcarey’s picture

Status: Closed (fixed) » Active

Actually this doesn't work as advertised here in 6.x-1.5 even though #8 says "Fixed in 6.1". Drush help does add the note that it "acts like running cron once". So while it does do the index once, it does it once only instead of as a batch as seen in the patch above. I'm guessing this is because the batch stuff was in 2.x and not 1.x, but I'm going to open this up to get confirmation that this was intended.

nick_vh’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

The 6.x-2.x version has been deprecated. Moving this to 6.x-1.x-dev

nick_vh’s picture

Version: 6.x-1.x-dev » 6.x-3.x-dev
Status: Active » Closed (works as designed)

And since feature requests are not valid for 6.x-1.x we are moving this to 6.x-3.x
Then again, I'm going to close this because 6.x-3.x will be a backport of 7.x-1.x and this version already supports this command search page.