? .svn
? highlighting.diff
? highlighting_body.diff
? SolrPhpClient/.svn
? SolrPhpClient/Apache/.svn
? SolrPhpClient/Apache/Solr/.svn
? SolrPhpClient/Apache/Solr/Service/.svn
? contrib/.svn
? contrib/apachesolr_attachments/.svn
? contrib/apachesolr_image/.svn
? contrib/apachesolr_lang/.svn
? contrib/apachesolr_mlt/.svn
? contrib/apachesolr_multisitesearch/.svn
? contrib/apachesolr_nodeaccess/.svn
? contrib/apachesolr_nodeaccess/tests/.svn
? tests/.svn
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.66
diff -u -r1.1.2.12.2.66 apachesolr.module
--- apachesolr.module	3 Dec 2008 18:48:00 -0000	1.1.2.12.2.66
+++ apachesolr.module	4 Dec 2008 13:28:38 -0000
@@ -157,7 +157,7 @@
   try {
     $solr = apachesolr_get_solr();
     $data = $solr->getLuke(1);
-  } 
+  }
   catch (Exception $e) {
     watchdog('apachesolr', $e->getMessage());
     drupal_set_message($e->getMessage(), "warning");
@@ -451,7 +451,7 @@
     $document->status = $node->status;
     $document->uid = $node->uid;
     $document->title = $node->title;
-    $document->body  = $node->body;
+    $document->body  = strip_tags($node->body . "\n\n" . implode(' ', $extra));
     $document->type  = $node->type;
     $document->changed = $node->changed;
     $document->comment_count = $node->comment_count;
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.38
diff -u -r1.1.2.6.2.38 apachesolr_search.module
--- apachesolr_search.module	2 Dec 2008 23:44:00 -0000	1.1.2.6.2.38
+++ apachesolr_search.module	4 Dec 2008 13:28:39 -0000
@@ -58,7 +58,7 @@
       global $pager_total;
 
       try {
-        // This is the object that knows about the query coming from the user.
+
         $query = apachesolr_drupal_query($keys);
         if (is_null($query)) {
           throw new Exception(t('Could not construct a Solr query in function apachesolr_search_search()'));
@@ -68,13 +68,21 @@
 
         $params = array(
           //'qt' => 'standard',
-          'fl' => '*,score',
+          'fl' => 'id,title,comment_count,type,changed,score,url,uid,name',
           'rows' => variable_get('apachesolr_rows', 10),
           'facet' => 'true',
           'facet.mincount' => 1,
           'facet.sort' => 'true'
         );
 
+        //Highlighting settings
+        $params['hl'] = 'true';
+        $params['hl.fragsize']= variable_get('apachesolr_textsnippetlength', 100);
+        $params['hl.simple.pre'] = variable_get('apachesolr_highlightpretag', '<strong>');
+        $params['hl.simple.post'] = variable_get('apachesolr_highlightposttag', '</strong>');
+        $params['hl.snippets'] = variable_get('apachesolr_numsnippets', 3);
+        $params['hl.fl'] = 'body';
+
         // TODO: This adds all of the possible facets to the query. Not all
         // of these facets have their blocks enabled, so the list should be
         // filtered by the actual enabled blocks, otherwise we're putting
@@ -133,9 +141,11 @@
         if (!$query) {
           return array();
         }
+
         // This is the object that does the communication with the solr server.
         $solr = apachesolr_get_solr();
         $response = $solr->search($query->get_query(), $params['start'], $params['rows'], $params);
+
         // The response is cached so that it is accessible to the blocks and anything
         // else that needs it beyond the initial search.
         apachesolr_static_response_cache($response);
@@ -147,10 +157,6 @@
           foreach ($response->response->docs as $doc) {
             $extra += node_invoke_nodeapi($doc, 'search result');
             $extra['score'] = $doc->score;
-            $snippet = search_excerpt($keys, $doc->body);
-            if (trim($snippet) == '...') {
-              $snippet = '';
-            }
             $results[] = array('link' => $doc->url,
                                'type' => node_get_types('name', $doc),
                                'title' => $doc->title,
@@ -159,7 +165,8 @@
                                'node' => $doc,
                                'extra' => $extra,
                                'score' => $doc->score,
-                               'snippet' => $snippet);
+                               'snippet' => theme('apachesolr_snippets',$node,$response->highlighting->{$doc->id}->body)
+                              );
           }
 
           // Hook to allow modifications of the retrieved results
@@ -356,6 +363,9 @@
     'apachesolr_breadcrumb_tid' => array(
       'arguments' => array('tid' => NULL),
     ),
+    'apachesolr_snippets' => array(
+      'arguments' => array('node' => NULL, 'snippets' => NULL),
+    ),
   );
 }
 
@@ -372,4 +382,14 @@
 function theme_apachesolr_breadcrumb_tid($tid) {
   $term = taxonomy_get_term($tid);
   return $term->name;
+}
+
+/**
+ * Returns the snipit text for a search entry
+ * @param object $node
+ * @param array $snippits
+ *
+ */
+function theme_apachesolr_snippets(&$node,$snippets) {
+  return implode(' ... ', $snippets);
 }
\ No newline at end of file
Index: schema.xml
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/schema.xml,v
retrieving revision 1.1.2.1.2.13
diff -u -r1.1.2.1.2.13 schema.xml
--- schema.xml	2 Dec 2008 01:53:17 -0000	1.1.2.1.2.13
+++ schema.xml	4 Dec 2008 13:28:39 -0000
@@ -240,7 +240,7 @@
        fields or fields that need an index-time boost need norms.
    -->
 
-<!-- The document id is derived from a site-spcific key (hash) and the node ID like: 
+<!-- The document id is derived from a site-spcific key (hash) and the node ID like:
      $document->id = $hash . '/node/' . $node->nid; -->
 
    <field name="id" type="string" indexed="true" stored="true" required="true" />
Index: solrconfig.xml
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/Attic/solrconfig.xml,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 solrconfig.xml
--- solrconfig.xml	30 Nov 2008 21:13:27 -0000	1.1.2.1
+++ solrconfig.xml	4 Dec 2008 13:28:39 -0000
@@ -17,8 +17,8 @@
 -->
 
 <config>
-  <!-- Set this to 'false' if you want solr to continue working after it has 
-       encountered an severe configuration error.  In a production environment, 
+  <!-- Set this to 'false' if you want solr to continue working after it has
+       encountered an severe configuration error.  In a production environment,
        you may want solr to keep working even if one handler is mis-configured.
 
        You may also set this to false using by setting the system property:
@@ -83,7 +83,7 @@
 
     <!--
       This option specifies which Lucene LockFactory implementation to use.
-      
+
       single = SingleInstanceLockFactory - suggested for a read-only index
                or when there is no possibility of another process trying
                to modify the index.
@@ -106,7 +106,7 @@
     <maxMergeDocs>2147483647</maxMergeDocs>
     <maxFieldLength>10000</maxFieldLength>
 
-    <!-- If true, unlock any held write or commit locks on startup. 
+    <!-- If true, unlock any held write or commit locks on startup.
          This defeats the locking mechanism that allows multiple
          processes to safely access a lucene index, and should be
          used with care.
@@ -114,17 +114,17 @@
      -->
     <unlockOnStartup>false</unlockOnStartup>
   </mainIndex>
-  
-  <!--	Enables JMX if and only if an existing MBeanServer is found, use 
+
+  <!--	Enables JMX if and only if an existing MBeanServer is found, use
   		this if you want to configure JMX through JVM parameters. Remove
   		this to disable exposing Solr configuration and statistics to JMX.
-  		
+
 		If you want to connect to a particular server, specify the agentId
 		e.g. <jmx agentId="myAgent" />
-		
+
 		If you want to start a new MBeanServer, specify the serviceUrl
 		e.g <jmx serviceurl="service:jmx:rmi:///jndi/rmi://localhost:9999/solr" />
-		
+
 		For more details see http://wiki.apache.org/solr/SolrJmx
   -->
   <jmx />
@@ -140,9 +140,9 @@
     <!-- Perform a <commit/> automatically under certain conditions:
          maxDocs - number of updates since last commit is greater than this
          maxTime - oldest uncommited update (in ms) is this long ago
-    <autoCommit> 
+    <autoCommit>
       <maxDocs>10000</maxDocs>
-      <maxTime>1000</maxTime> 
+      <maxTime>1000</maxTime>
     </autoCommit>
     -->
 
@@ -163,7 +163,7 @@
     </listener>
     -->
     <!-- A postOptimize event is fired only after every optimize command, useful
-         in conjunction with index distribution to only distribute optimized indicies 
+         in conjunction with index distribution to only distribute optimized indicies
     <listener event="postOptimize" class="solr.RunExecutableListener">
       <str name="exe">snapshooter</str>
       <str name="dir">solr/bin</str>
@@ -180,7 +180,7 @@
         queries.  An exception is thrown if exceeded.  -->
     <maxBooleanClauses>1024</maxBooleanClauses>
 
-    
+
     <!-- Cache used by SolrIndexSearcher for filters (DocSets),
          unordered sets of *all* documents that match a query.
          When a new searcher is opened, its caches may be prepopulated
@@ -256,7 +256,7 @@
          then documents 0 through 49 will be collected and cached.  Any further
          requests in that range can be satisfied via the cache.  -->
     <queryResultWindowSize>50</queryResultWindowSize>
-    
+
     <!-- Maximum number of documents to cache for any entry in the
          queryResultCache. -->
     <queryResultMaxDocsCached>200</queryResultMaxDocsCached>
@@ -302,7 +302,7 @@
 
   </query>
 
-  <!-- 
+  <!--
     Let the dispatch filter handler /select?qt=XXX
     handleSelect=true will use consistent error handling for /select and /update
     handleSelect=false will use solr1.1 style error formatting
@@ -310,9 +310,9 @@
   <requestDispatcher handleSelect="true" >
     <!--Make sure your system has some authentication before enabling remote streaming!  -->
     <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
-        
+
     <!-- Set HTTP caching related parameters (for proxy caches and clients).
-          
+
          To get the behaviour of Solr 1.2 (ie: no caching related headers)
          use the never304="true" option and do not specify a value for
          <cacheControl>
@@ -326,7 +326,7 @@
             You can change it to lastModFrom="dirLastMod" if you want the
             value to exactly corrispond to when the physical index was last
             modified.
-               
+
             etagSeed="..." is an option you can change to force the ETag
             header (and validation against If-None-Match requests) to be
             differnet even if the index has not changed (ie: when making
@@ -338,7 +338,7 @@
        <!-- If you include a <cacheControl> directive, it will be used to
             generate a Cache-Control header, as well as an Expires header
             if the value contains "max-age="
-               
+
             By default, no Cache-Control header is generated.
 
             You can use the <cacheControl> option even if you have set
@@ -347,11 +347,11 @@
        <!-- <cacheControl>max-age=30, public</cacheControl> -->
     </httpCaching>
   </requestDispatcher>
-  
-      
+
+
   <!-- requestHandler plugins... incoming queries will be dispatched to the
      correct handler based on the path or the qt (query type) param.
-     Names starting with a '/' are accessed with the a path equal to the 
+     Names starting with a '/' are accessed with the a path equal to the
      registered name.  Names without a leading '/' are accessed with:
       http://host/app/select?qt=name
      If no qt is defined, the requestHandler that declares default="true"
@@ -361,7 +361,16 @@
     <!-- default values for query parameters -->
      <lst name="defaults">
        <str name="echoParams">explicit</str>
-       <!-- 
+       <str name="hl">true</str>
+       <str name="hl.fl">body</str>
+       <str name="hl.mergeContiguous">true</str>
+     <!-- instructs Solr to return the field itself if no query terms are
+          found -->
+
+       <str name="f.body.hl.alternateField">body</str>
+       <str name="f.body.hl.maxAlternateFieldLength">256</str>
+       <str name="f.body.hl.fragmenter">regex</str> <!-- defined below -->
+       <!--
        <int name="rows">10</int>
        <str name="fl">*</str>
        <str name="version">2.1</str>
@@ -373,7 +382,7 @@
   <!-- DisMaxRequestHandler allows easy searching across multiple fields
        for simple user-entered phrases.  It's implementation is now
        just the standard SearchHandler with a default query type
-       of "dismax". 
+       of "dismax".
        see http://wiki.apache.org/solr/DisMaxRequestHandler
    -->
   <requestHandler name="dismax" class="solr.SearchHandler" >
@@ -398,7 +407,7 @@
      </str>
      <int name="ps">100</int>
      <str name="q.alt">*:*</str>
-     <!-- example highlighter config, enable per-query with hl=true -->     
+     <!-- example highlighter config, enable per-query with hl=true -->
      <str name="hl.fl">text features name</str>
      <!-- for this field, we want no fragmenting, just highlighting -->
      <str name="f.name.hl.fragsize">0</str>
@@ -462,13 +471,13 @@
       <str name="facet.query">price:[500 TO *]</str>
     </lst>
   </requestHandler>
-  
+
 
   <!--
    Search components are registered to SolrCore and used by Search Handlers
-   
+
    By default, the following components are avaliable:
-    
+
    <searchComponent name="query"     class="org.apache.solr.handler.component.QueryComponent" />
    <searchComponent name="facet"     class="org.apache.solr.handler.component.FacetComponent" />
    <searchComponent name="mlt"       class="org.apache.solr.handler.component.MoreLikeThisComponent" />
@@ -486,11 +495,11 @@
 
     If you register a searchComponent to one of the standard names, that will be used instead.
     To insert handlers before or after the 'standard' components, use:
-    
+
     <arr name="first-components">
       <str>myFirstComponentName</str>
     </arr>
-    
+
     <arr name="last-components">
       <str>myLastComponentName</str>
     </arr>
@@ -540,7 +549,7 @@
       <str>spellcheck</str>
     </arr>
   </requestHandler>
- 
+
   <!-- a search component that enables you to configure the top results for
        a given query regardless of the normal lucene scoring.-->
   <searchComponent name="elevator" class="solr.QueryElevationComponent" >
@@ -548,7 +557,7 @@
     <str name="queryFieldType">string</str>
     <str name="config-file">elevate.xml</str>
   </searchComponent>
- 
+
   <!-- a request handler utilizing the elevator component -->
   <requestHandler name="/elevate" class="solr.SearchHandler" startup="lazy">
     <lst name="defaults">
@@ -558,14 +567,14 @@
       <str>elevator</str>
     </arr>
   </requestHandler>
-  
 
-  <!-- Update request handler.  
-  
-       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in 
+
+  <!-- Update request handler.
+
+       Note: Since solr1.1 requestHandlers requires a valid content type header if posted in
        the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8'
        The response format differs from solr1.1 formatting and returns a standard error code.
-       
+
        To enable solr1.1 behavior, remove the /update handler or change its path
     -->
   <requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
@@ -575,33 +584,33 @@
    for debugging and as a token server for other types of applications
    -->
   <requestHandler name="/analysis" class="solr.AnalysisRequestHandler" />
-  
+
 
   <!-- CSV update handler, loaded on demand -->
   <requestHandler name="/update/csv" class="solr.CSVRequestHandler" startup="lazy" />
 
 
-  <!-- 
-   Admin Handlers - This will register all the standard admin RequestHandlers.  Adding 
+  <!--
+   Admin Handlers - This will register all the standard admin RequestHandlers.  Adding
    this single handler is equivolent to registering:
-   
+
   <requestHandler name="/admin/luke"       class="org.apache.solr.handler.admin.LukeRequestHandler" />
   <requestHandler name="/admin/system"     class="org.apache.solr.handler.admin.SystemInfoHandler" />
   <requestHandler name="/admin/plugins"    class="org.apache.solr.handler.admin.PluginInfoHandler" />
   <requestHandler name="/admin/threads"    class="org.apache.solr.handler.admin.ThreadDumpHandler" />
   <requestHandler name="/admin/properties" class="org.apache.solr.handler.admin.PropertiesRequestHandler" />
   <requestHandler name="/admin/file"       class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
-  
+
   If you wish to hide files under ${solr.home}/conf, explicitly register the ShowFileRequestHandler using:
   <requestHandler name="/admin/file" class="org.apache.solr.handler.admin.ShowFileRequestHandler" >
     <lst name="invariants">
-     <str name="hidden">synonyms.txt</str> 
-     <str name="hidden">anotherfile.txt</str> 
+     <str name="hidden">synonyms.txt</str>
+     <str name="hidden">anotherfile.txt</str>
     </lst>
   </requestHandler>
   -->
   <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
-  
+
   <!-- ping/healthcheck -->
   <requestHandler name="/admin/ping" class="PingRequestHandler">
     <lst name="defaults">
@@ -610,7 +619,7 @@
       <str name="echoParams">all</str>
     </lst>
   </requestHandler>
-    
+
   <!-- Echo the request contents back to the client -->
   <requestHandler name="/debug/dump" class="solr.DumpRequestHandler" >
     <lst name="defaults">
@@ -618,7 +627,7 @@
      <str name="echoHandler">true</str>
     </lst>
   </requestHandler>
-  
+
   <highlighting>
    <!-- Configure the standard fragmenter -->
    <!-- This could most likely be commented out in the "default" case -->
@@ -634,26 +643,26 @@
       <!-- slightly smaller fragsizes work better because of slop -->
       <int name="hl.fragsize">70</int>
       <!-- allow 50% slop on fragment sizes -->
-      <float name="hl.regex.slop">0.5</float> 
+      <float name="hl.regex.slop">0.5</float>
       <!-- a basic sentence pattern -->
       <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str>
     </lst>
    </fragmenter>
-   
+
    <!-- Configure the standard formatter -->
    <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true">
     <lst name="defaults">
-     <str name="hl.simple.pre"><![CDATA[<em>]]></str>
-     <str name="hl.simple.post"><![CDATA[</em>]]></str>
+     <str name="hl.simple.pre"><![CDATA[<strong>]]></str>
+     <str name="hl.simple.post"><![CDATA[</strong>]]></str>
     </lst>
    </formatter>
   </highlighting>
-  
-  
+
+
   <!-- queryResponseWriter plugins... query responses will be written using the
     writer specified by the 'wt' request parameter matching the name of a registered
     writer.
-    The "default" writer is the default and will be used if 'wt' is not specified 
+    The "default" writer is the default and will be used if 'wt' is not specified
     in the request. XMLResponseWriter will be used if nothing is specified here.
     The json, python, and ruby writers are also available by default.
 
@@ -669,25 +678,25 @@
 
   <!-- XSLT response writer transforms the XML output by any xslt file found
        in Solr's conf/xslt directory.  Changes to xslt files are checked for
-       every xsltCacheLifetimeSeconds.  
+       every xsltCacheLifetimeSeconds.
    -->
   <queryResponseWriter name="xslt" class="org.apache.solr.request.XSLTResponseWriter">
     <int name="xsltCacheLifetimeSeconds">5</int>
-  </queryResponseWriter> 
+  </queryResponseWriter>
 
 
   <!-- example of registering a query parser
   <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>
   -->
 
-  <!-- example of registering a custom function parser 
+  <!-- example of registering a custom function parser
   <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />
   -->
-    
-  <!-- config for the admin interface --> 
+
+  <!-- config for the admin interface -->
   <admin>
     <defaultQuery>solr</defaultQuery>
-    
+
     <!-- configure a healthcheck file for servers behind a loadbalancer
     <healthcheck type="file">server-enabled</healthcheck>
     -->
Index: SolrPhpClient/Apache/Solr/Response.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/SolrPhpClient/Apache/Solr/Response.php,v
retrieving revision 1.1.2.1.2.6
diff -u -r1.1.2.1.2.6 Response.php
--- SolrPhpClient/Apache/Solr/Response.php	25 Oct 2008 16:49:25 -0000	1.1.2.1.2.6
+++ SolrPhpClient/Apache/Solr/Response.php	4 Dec 2008 13:28:40 -0000
@@ -223,7 +223,6 @@
   {
     //An alternative would be to use Zend_Json::decode(...)
     $data = json_decode($this->_rawResponse);
-
     //if we're configured to collapse single valued arrays or to convert them to Apache_Solr_Document objects
     //and we have response documents, then try to collapse the values and / or convert them now
     if (($this->_createDocuments || $this->_collapseSingleValueArrays) && isset($data->response) && is_array($data->response->docs))
Index: contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/contrib/apachesolr_nodeaccess/Attic/apachesolr_nodeaccess.module,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 apachesolr_nodeaccess.module
--- contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module	2 Dec 2008 23:44:01 -0000	1.1.2.2
+++ contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module	4 Dec 2008 13:28:42 -0000
@@ -15,6 +15,10 @@
   }
 }
 
+function apachesolr_facets() {
+    return array('nodeaccess_nodeaccess_author');
+}
+
 /**
  * Creates a Solr query for a given user
  *
