Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.13
diff -u -p -r1.1.2.13 apachesolr.index.inc
--- apachesolr.index.inc	14 Oct 2009 19:08:19 -0000	1.1.2.13
+++ apachesolr.index.inc	14 Nov 2009 03:00:25 -0000
@@ -85,6 +85,7 @@ function apachesolr_node_to_document($ni
     $document->id = apachesolr_document_id($node->nid);
     $document->site = url(NULL, array('absolute' => TRUE));
     $document->hash = apachesolr_site_hash();
+    $document->entity_type = 'node';
     $document->nid = $node->nid;
     $document->uid = $node->uid;
     $document->title = $node->title;
@@ -97,6 +98,7 @@ function apachesolr_node_to_document($ni
     if (!empty($node->language)) {
       $document->language = $node->language;
     }
+    // TODO - apparently 'zxx' is the no language code in Drupal 7.
     $document->body = apachesolr_clean_text($text);
     $document->type  = $node->type;
     $document->type_name = apachesolr_strip_ctl_chars(node_get_types('name', $node));
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.167
diff -u -p -r1.1.2.12.2.167 apachesolr.module
--- apachesolr.module	14 Oct 2009 19:08:19 -0000	1.1.2.12.2.167
+++ apachesolr.module	14 Nov 2009 03:00:25 -0000
@@ -163,8 +163,19 @@ function apachesolr_site_hash() {
   return $hash;
 }
 
-function apachesolr_document_id($id, $type = 'node') {
-  return apachesolr_site_hash() . "/$type/" . $id;
+/**
+ * Generate a unique ID for an entity being indexed.
+ *
+ * @param $id
+ *   An id number (or string) unique to this site, such as a node ID.
+ * @param $enty_type
+ *   A string like 'node', 'file', 'user', or some other Drupal object type.
+ *
+ * @return
+ *   A string combining the parameters with the site hash.
+ */
+function apachesolr_document_id($id, $entity_type = 'node') {
+  return apachesolr_site_hash() . "/{$entity_type}/" . $id;
 }
 
 /**
Index: schema.xml
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/schema.xml,v
retrieving revision 1.1.2.1.2.33
diff -u -p -r1.1.2.1.2.33 schema.xml
--- schema.xml	29 Jul 2009 18:17:13 -0000	1.1.2.1.2.33
+++ schema.xml	14 Nov 2009 03:00:26 -0000
@@ -11,7 +11,7 @@
  http://wiki.apache.org/solr/SchemaXml
 -->
 
-<schema name="drupal-0.9.3" version="1.1">
+<schema name="drupal-0.9.4" version="1.1">
   <!-- attribute "name" is the name of this schema and is only used for display purposes.
        Applications should change this to reflect the nature of the search collection.
        version="1.1" is Solr's version number for the schema syntax and semantics.  It should
@@ -264,6 +264,9 @@
    <field name="sort_title" type="sortString" indexed="true" stored="false"/>
    <field name="body" type="text" indexed="true" stored="true" termVectors="true"/>
    <field name="teaser" type="text" indexed="false" stored="true"/>
+   <!-- enty_type is 'node', 'file', 'user', or some other Drupal object type -->
+   <field name="entity_type" type="string" indexed="true" stored="true"/>
+   <!-- type is a node type, or can be used flexibly for other entity types -->
    <field name="type" type="string" indexed="true" stored="true"/>
    <field name="type_name" type="string" indexed="true" stored="true"/>
    <field name="path" type="string" indexed="true" stored="true"/>
