diff --cc apachesolr_attachments.install
index b8df3a9,2465641..0000000
--- a/apachesolr_attachments.install
+++ b/apachesolr_attachments.install
@@@ -100,12 -87,49 +87,55 @@@ function apachesolr_attachments_schema(
          'size' => 'big',
        ),
      ),
-     'indexes' => array(
-       'removed' => array('removed'),
-     ),
-     'primary key' => array('fid', 'nid'),
+     'primary key' => array('fid'),
    );
  
+   $schema['apachesolr_attachments_entity_file_references'] = array(
+       'description' => 'Stores a record of when an entity changed to determine if it needs indexing by Solr.',
+       'fields' => array(
+         'entity_type' => array(
+           'description' => 'The type of entity.',
+           'type' => 'varchar',
+           'length' => 32,
+           'not null' => TRUE,
+         ),
++        'bundle' => array(
++          'description' => 'The bundle to which this entity belongs.',
++          'type' => 'varchar',
++          'length' => 128,
++          'not null' => TRUE,
++        ),
+         'entity_id' => array(
+           'description' => 'The primary identifier for an entity.',
+           'type' => 'int',
+           'unsigned' => TRUE,
+           'not null' => TRUE,
+         ),
+         'fid' => array(
+           'description' => 'The primary identifier for a file.',
+           'type' => 'int',
+           'unsigned' => TRUE,
+           'not null' => TRUE,
+         ),
+         'removed' => array(
+           'description' => 'Boolean indicating whether the file is no longer attached (needs to be deleted).',
+           'type' => 'int',
+           'not null' => TRUE,
+           'default' => 0,
+         ),
+         'changed' => array(
+           'description' => 'The Unix timestamp when an entity was changed.',
+           'type' => 'int',
+           'not null' => TRUE,
+           'default' => 0,
+         ),
+       ),
+       'indexes' => array(
+         'changed' => array('changed'),
+         'removed' => array('removed'),
+       ),
+       'primary key' => array('entity_id', 'entity_type', 'fid'),
+   );
    return $schema;
  }
  
@@@ -142,11 -166,3 +172,79 @@@ function apachesolr_attachments_update_
    $active[] = 'apachesolr_attachments';
    variable_set('search_active_modules', array_unique($active));
  }
 +
 +/**
 + * Change DB index to allow files attached to multiple nodes.
 + */
 +function apachesolr_attachments_update_7002() {
-   db_query('ALTER TABLE {apachesolr_attachments_files} DROP INDEX `nid`');
-   db_query('ALTER TABLE {apachesolr_attachments_files} DROP PRIMARY KEY, ADD PRIMARY KEY (`fid`, `nid`)');
++  // Removed.
++}
++
++/**
++ * Change DB tables to support multiple entity indexing.
++ */
++function apachesolr_attachments_update_7003() {
++  $schema['apachesolr_attachments_entity_file_references'] = array(
++      'description' => 'Stores a record of when an entity changed to determine if it needs indexing by Solr.',
++      'fields' => array(
++        'entity_type' => array(
++          'description' => 'The type of entity.',
++          'type' => 'varchar',
++          'length' => 32,
++          'not null' => TRUE,
++        ),
++        'bundle' => array(
++          'description' => 'The bundle to which this entity belongs.',
++          'type' => 'varchar',
++          'length' => 128,
++          'not null' => TRUE,
++        ),
++        'entity_id' => array(
++          'description' => 'The primary identifier for an entity.',
++          'type' => 'int',
++          'unsigned' => TRUE,
++          'not null' => TRUE,
++        ),
++        'fid' => array(
++          'description' => 'The primary identifier for a file.',
++          'type' => 'int',
++          'unsigned' => TRUE,
++          'not null' => TRUE,
++        ),
++        'removed' => array(
++          'description' => 'Boolean indicating whether the file is no longer attached (needs to be deleted).',
++          'type' => 'int',
++          'not null' => TRUE,
++          'default' => 0,
++        ),
++        'changed' => array(
++          'description' => 'The Unix timestamp when an entity was changed.',
++          'type' => 'int',
++          'not null' => TRUE,
++          'default' => 0,
++        ),
++      ),
++      'indexes' => array(
++        'changed' => array('changed'),
++        'removed' => array('removed'),
++      ),
++      'primary key' => array('entity_id', 'entity_type', 'fid'),
++  );
++  db_create_table('apachesolr_attachments_entity_file_references', $schema['apachesolr_attachments_entity_file_references']);
++  // Move some data from apachesolr_attachments_files to apachesolr_attachments_entity_file_references
++  $select = db_select('apachesolr_attachments_files', 'af');
++  $select->join('node', 'n', 'af.nid = n.nid');
++  $select->addField('n', 'nid', 'entity_id');
++  $select->addField('n', 'type', 'bundle');
++  $select->addField('af', 'fid', 'fid');
++  $select->addField('af', 'removed', 'removed');
++  $select->addExpression("0", 'changed');
++  $select->addExpression("'node'", 'entity_type');
++  $return_value = db_insert('apachesolr_index_entities_node')
++    ->fields(array('entity_id', 'bundle', 'fid', 'removed', 'changed', 'entity_type'))
++    ->from($select)
++    ->execute();
++  db_drop_index('apachesolr_attachments_files', 'removed');
++  db_drop_field('apachesolr_attachments_files', 'nid');
++  db_drop_field('apachesolr_attachments_files', 'removed');
 +}
diff --git a/apachesolr_attachments.index.inc b/apachesolr_attachments.index.inc
index d2223a3..b74cdf1 100644
--- a/apachesolr_attachments.index.inc
+++ b/apachesolr_attachments.index.inc
@@ -312,7 +312,7 @@ function apachesolr_attachments_extract_using_tika($filepath) {
 }
 
 /**
- * For a file path, try to extract text using Solr 1.4.
+ * For a file path, try to extract text using Solr 1.4+.
  *
  * @throws Exception
  */
