diff --git a/apachesolr.index.inc b/apachesolr.index.inc
index 7f39d76..810f626 100644
--- a/apachesolr.index.inc
+++ b/apachesolr.index.inc
@@ -992,11 +992,24 @@ function apachesolr_index_node_solr_reindex($env_id, $bundle = NULL) {
     $delete->execute();
 
     $select = db_select('node', 'n');
-    $select->condition('status', 1);
+
+    //jsprague - query based on config
+    if (!variable_get('apachesolr_index_unpublished', 0)) {
+      $select->condition('status', 1);
+    }
+
     $select->addExpression("'node'", 'entity_type');
     $select->addField('n', 'nid', 'entity_id');
     $select->addField('n', 'type', 'bundle');
-    $select->addField('n', 'status', 'status');
+
+    //jsprague - query based on config
+    if (!variable_get('apachesolr_index_unpublished', 0)) {
+      $select->addField('n', 'status', 'status');
+    } else {
+      //jsprague - trick indexer into thinking everything is published
+      $select->addField(NULL, 1, 'status');
+    }
+
     $select->addExpression(REQUEST_TIME, 'changed');
 
     if ($bundle) {
@@ -1042,6 +1055,12 @@ function apachesolr_index_node_status_callback($entity_id, $entity_type, $entity
     // If the object failed to load, just stop.
     return FALSE;
   }
+
+  // jsprague - trick indexer to index unpublished
+  if (variable_get('apachesolr_index_unpublished', 0)) {
+    return 1;
+  }
+
   // Make sure we have an integer value.
   // Anything different from 1 becomes zero
   return ($entity->status == 1 ? 1 : 0);
@@ -1385,20 +1404,24 @@ function apachesolr_index_node_check_table() {
   // We do not check more nodes than double the cron limit per time
   // Update or delete at most this many in each Solr query.
   $limit = variable_get('apachesolr_cron_mass_limit', 500);
-  $query = db_select($table, 'aie')
-    ->fields('n', array('nid', 'status'))
-    ->where('aie.status <> n.status')
-    ->range(0, ($limit * 2))
-    ->addTag('apachesolr_index_node');
-  $query->innerJoin('node', 'n', 'n.nid = aie.entity_id');
-  $nodes = $query->execute()->fetchAllAssoc('nid');
 
-  $node_lists = array_chunk($nodes, $limit, TRUE);
-  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_NOTICE);
-    if (!apachesolr_index_nodeapi_mass_update($nodes, $table)) {
-      // Solr query failed - so stop trying.
-      break;
+  //jsprague - only keep status in sync if not indexing unpublished nodes
+  if (!variable_get('apachesolr_index_unpublished', 0)) {
+    $query = db_select($table, 'aie')
+      ->fields('n', array('nid', 'status'))
+      ->where('aie.status <> n.status')
+      ->range(0, ($limit * 2))
+      ->addTag('apachesolr_index_node');
+    $query->innerJoin('node', 'n', 'n.nid = aie.entity_id');
+    $nodes = $query->execute()->fetchAllAssoc('nid');
+
+    $node_lists = array_chunk($nodes, $limit, TRUE);
+    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_NOTICE);
+      if (!apachesolr_index_nodeapi_mass_update($nodes, $table)) {
+        // Solr query failed - so stop trying.
+        break;
+      }
     }
   }
 
@@ -1451,6 +1474,13 @@ function apachesolr_index_nodeapi_mass_update(array $nodes, $table = NULL) {
       $unpublished_ids[$node->nid] = apachesolr_document_id($node->nid);
     }
   }
+
+  // jsprague - if indexing unpublished, put everything into the published ids, treat everthing as published
+  if (variable_get('apachesolr_index_unpublished', 0)) {
+    $published_ids = array_merge($published_ids, $unpublished_ids);
+    $unpublished_ids = array();
+  }
+
   try {
     $env_id = apachesolr_default_environment();
     $solr = apachesolr_get_solr($env_id);
