From 0e7747e98cf1d278f327fb02ca4357faa74cdb0f Mon Sep 17 00:00:00 2001
From: pfrenssen <pfrenssen@382067.no-reply.drupal.org>
Date: Sat, 13 Aug 2011 19:58:38 +0200
Subject: [PATCH] Issue #1248428 by pfrenssen: Port changes to config files from Apache Solr module.

---
 apachesolr_multilingual.module                    |   16 +-
 apachesolr_multilingual.schema_generator.inc      |    8 +-
 resources/fieldType_text_LANGUAGE.xml             |    5 +
 resources/fieldType_text_no_stemming_LANGUAGE.xml |    5 +
 resources/schema.xml                              |  237 ++++++++++++---------
 resources/solrconfig.xml                          |   24 +-
 6 files changed, 165 insertions(+), 130 deletions(-)

diff --git a/apachesolr_multilingual.module b/apachesolr_multilingual.module
index 3a0107d..1327fbd 100644
--- a/apachesolr_multilingual.module
+++ b/apachesolr_multilingual.module
@@ -111,8 +111,8 @@ function apachesolr_multilingual_apachesolr_update_index($document, $node, $name
       }
 
       // use language specific stemming and so on ..
-      $document->{'title_' . $language} = $document->title;
-      $document->{'body_' . $language} = $document->body;
+      $document->{'label_' . $language} = $document->label;
+      $document->{'content_' . $language} = $document->content;
 
       $solr = apachesolr_get_solr();
       $fields = $solr->getFields();
@@ -154,8 +154,8 @@ function apachesolr_multilingual_apachesolr_update_index($document, $node, $name
           if ($translation->nid != $node->nid) {
             if ($translation_node = node_load($translation->nid)) {
               if ($translation_document = apachesolr_node_to_document($translation_node, $namespace)) {
-                $document->{'title_' . $translation_language} = $translation_document->title;
-                $document->{'body_' . $translation_language} = $translation_document->body;
+                $document->{'label_' . $translation_language} = $translation_document->label;
+                $document->{'content_' . $translation_language} = $translation_document->content;
 
                 foreach ($fields as $field_name => $field) {
                   if (strpos($field_name, 'ts_') === 0 && !empty($translation_document->{$field_name})) {
@@ -223,9 +223,9 @@ function apachesolr_multilingual_form_alter(&$form, &$form_state, $form_id) {
     // Note - we have default values set in solrconfig.xml, which will operate
     // when none are set.  That's the preferred state.
     $defaults = array(
-      'body' => '1.0',
-      'title' => '5.0',
-      'name' => '3.0',
+      'content' => '1.0',
+      'label' => '5.0',
+      'om_name' => '3.0',
       'taxonomy_names' => '2.0',
       'tags_h1' => '5.0',
       'tags_h2_h3' => '3.0',
@@ -399,7 +399,7 @@ function apachesolr_multilingual_apachesolr_modify_query(&$query, $caller) {
   }
 
   if (empty($params['hl.fl'])) {
-    $params['hl.fl'] = 'body';
+    $params['hl.fl'] = 'content';
   }
 
   if ($filter_language && in_array($filter_language, $languages)) {
diff --git a/apachesolr_multilingual.schema_generator.inc b/apachesolr_multilingual.schema_generator.inc
index 951ae23..0a6b012 100644
--- a/apachesolr_multilingual.schema_generator.inc
+++ b/apachesolr_multilingual.schema_generator.inc
@@ -270,11 +270,11 @@ function apachesolr_multilingual_schema_generator_form_do_validate(&$form, &$for
     $blocks = array();
     $blocks['<!-- fieldType_textSpell_LANGUAGE -->'] = $field_type_text_spell_language;
     $blocks['<!-- lst_spellchecker_LANGUAGE -->'] = $lst_spellchecker_language;
-    $blocks['<!-- field_title_LANGUAGE -->'] = '<field name="title[LANGUAGE_ID]" type="text[LANGUAGE_ID]" indexed="true" stored="true" termVectors="true" omitNorms="true"/>';
-    $blocks['<!-- field_body_LANGUAGE -->'] = '<field name="body[LANGUAGE_ID]" type="text[LANGUAGE_ID]" indexed="true" stored="true" termVectors="true"/>';
+    $blocks['<!-- field_label_LANGUAGE -->'] = '<field name="label[LANGUAGE_ID]" type="text[LANGUAGE_ID]" indexed="true" stored="true" termVectors="true" omitNorms="true"/>';
+    $blocks['<!-- field_content_LANGUAGE -->'] = '<field name="content[LANGUAGE_ID]" type="text[LANGUAGE_ID]" indexed="true" stored="true" termVectors="true"/>';
     $blocks['<!-- field_spell_LANGUAGE -->'] = '<field name="spell[LANGUAGE_ID]" type="textSpell[LANGUAGE_ID]" indexed="true" stored="true" multiValued="true"/>';
-    $blocks['<!-- copyField_title_LANGUAGE_spell_LANGUAGE -->'] = '<copyField source="title[LANGUAGE_ID]" dest="spell[LANGUAGE_ID]"/>';
-    $blocks['<!-- copyField_body_LANGUAGE_spell_LANGUAGE -->'] = '<copyField source="body[LANGUAGE_ID]" dest="spell[LANGUAGE_ID]"/>';
+    $blocks['<!-- copyField_label_LANGUAGE_spell_LANGUAGE -->'] = '<copyField source="label[LANGUAGE_ID]" dest="spell[LANGUAGE_ID]"/>';
+    $blocks['<!-- copyField_content_LANGUAGE_spell_LANGUAGE -->'] = '<copyField source="content[LANGUAGE_ID]" dest="spell[LANGUAGE_ID]"/>';
     $blocks['<!-- field_taxonomy_names_LANGUAGE -->'] = '<field name="taxonomy_names[LANGUAGE_ID]" type="text[LANGUAGE_ID]" indexed="true" stored="false" termVectors="true" multiValued="true" omitNorms="true"/>';
     $blocks['<!-- dynamicField_tags_LANGUAGE_* -->'] = '<dynamicField name="tags[LANGUAGE_ID]_*" type="text[LANGUAGE_ID]" indexed="true" stored="false" omitNorms="true"/>';
     $blocks['<!-- fieldType_textSpell_multilingual_StopFilter -->'] = '<filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_spell[LANGUAGE_ID].txt"/>';
diff --git a/resources/fieldType_text_LANGUAGE.xml b/resources/fieldType_text_LANGUAGE.xml
index d408f77..ab5a04d 100755
--- a/resources/fieldType_text_LANGUAGE.xml
+++ b/resources/fieldType_text_LANGUAGE.xml
@@ -3,6 +3,9 @@
       <analyzer type="index">
         <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms[LANGUAGE_ID].txt" ignoreCase="true" expand="false"/>
+        -->
         <!-- Case insensitive stop word removal.
           add enablePositionIncrements=true in both the index and query
           analyzers to leave a 'gap' for more accurate phrase queries.
@@ -13,6 +16,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords[LANGUAGE_ID].txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_INDEX]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_INDEX]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_INDEX]"
@@ -38,6 +42,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords[LANGUAGE_ID].txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_QUERY]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_QUERY]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_QUERY]"
diff --git a/resources/fieldType_text_no_stemming_LANGUAGE.xml b/resources/fieldType_text_no_stemming_LANGUAGE.xml
index c0e6f61..6122925 100755
--- a/resources/fieldType_text_no_stemming_LANGUAGE.xml
+++ b/resources/fieldType_text_no_stemming_LANGUAGE.xml
@@ -3,6 +3,9 @@
       <analyzer type="index">
         <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <!-- in this example, we will only use synonyms at query time
+        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms[LANGUAGE_ID].txt" ignoreCase="true" expand="false"/>
+        -->
         <!-- Case insensitive stop word removal.
           add enablePositionIncrements=true in both the index and query
           analyzers to leave a 'gap' for more accurate phrase queries.
@@ -13,6 +16,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords[LANGUAGE_ID].txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_INDEX]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_INDEX]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_INDEX]"
@@ -37,6 +41,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords[LANGUAGE_ID].txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_QUERY]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_QUERY]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_QUERY]"
diff --git a/resources/schema.xml b/resources/schema.xml
index f2851af..87d223d 100755
--- a/resources/schema.xml
+++ b/resources/schema.xml
@@ -37,6 +37,8 @@
 
     <!-- boolean type: "true" or "false" -->
     <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+    <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings -->
+    <fieldtype name="binary" class="solr.BinaryField"/>
 
     <!-- The optional sortMissingLast and sortMissingFirst attributes are
          currently supported on types that are sorted internally as strings.
@@ -51,15 +53,11 @@
          field first in an ascending sort and last in a descending sort.
     -->
 
-
-    <!-- numeric field types that store and index the text
-         value verbatim (and hence don't support range queries, since the
-         lexicographic ordering isn't equal to the numeric ordering) -->
-    <fieldType name="integer" class="solr.IntField" omitNorms="true"/>
-    <fieldType name="long" class="solr.LongField" omitNorms="true"/>
-    <fieldType name="float" class="solr.FloatField" omitNorms="true"/>
-    <fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
-
+    <!-- numeric field types that can be sorted, but are not optimized for range queries -->
+    <fieldType name="integer" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
 
     <!--
       Note:
@@ -137,7 +135,7 @@
     -->
 
     <!-- A text field that only splits on whitespace for exact matching of words -->
-    <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+    <fieldType name="text_ws" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
       <analyzer>
         <tokenizer class="solr.WhitespaceTokenizerFactory"/>
         <filter class="solr.LowerCaseFilterFactory"/>
@@ -168,6 +166,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords.txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_INDEX]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_INDEX]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_INDEX]"
@@ -193,6 +192,7 @@
                 enablePositionIncrements="true"
                 />
         <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords.txt"
                 splitOnCaseChange="[SPLIT_ON_CASE_CHANGE_QUERY]"
                 splitOnNumerics="[SPILT_ON_NUMERICS_QUERY]"
                 stemEnglishPossessive="[STEM_ENGLISH_POSSESSIVE_QUERY]"
@@ -211,11 +211,46 @@
     
     <!-- fieldType_text_LANGUAGE -->
 
+    <!-- An unstemmed text field - good if one does not know the language of the field -->
+    <fieldType name="text_und" class="solr.TextField" positionIncrementGap="100">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
+        <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords.txt"
+                generateWordParts="1"
+                generateNumberParts="1"
+                catenateWords="1"
+                catenateNumbers="1"
+                catenateAll="0"
+                splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.StopFilterFactory"
+                ignoreCase="true"
+                words="stopwords.txt"
+                enablePositionIncrements="true"
+                />
+        <filter class="solr.WordDelimiterFilterFactory"
+                protected="protwords.txt"
+                generateWordParts="1"
+                generateNumberParts="1"
+                catenateWords="0"
+                catenateNumbers="0"
+                catenateAll="0"
+                splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
     <!-- Edge N gram type - for example for matching against queries with results 
         KeywordTokenizer leaves input string intact as a single term.
         see: http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/
    -->
-    <fieldType name="edge_n2_kw_text" class="solr.TextField" positionIncrementGap="100">
+    <fieldType name="edge_n2_kw_text" class="solr.TextField" omitNorms="true" positionIncrementGap="100">
      <analyzer type="index">
        <tokenizer class="solr.KeywordTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
@@ -228,15 +263,15 @@
     </fieldType>
    <!--  Setup simple analysis for spell checking -->
     
-    <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
-      <analyzer>
-        <tokenizer class="solr.StandardTokenizerFactory" />
-        <!-- stopwords_spell --><filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
-        <filter class="solr.LengthFilterFactory" min="[SPELL_LENGTH_MIN]" max="[SPELL_LENGTH_MAX]" />
-        <filter class="solr.LowerCaseFilterFactory" />
-        <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
-      </analyzer>
-    </fieldType>
+   <fieldType name="textSpell" class="solr.TextField" positionIncrementGap="100">
+     <analyzer>
+       <tokenizer class="solr.StandardTokenizerFactory" />
+       <!-- stopwords_spell --><filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/>
+       <filter class="solr.LengthFilterFactory" min="[SPELL_LENGTH_MIN]" max="[SPELL_LENGTH_MAX]" />
+       <filter class="solr.LowerCaseFilterFactory" />
+       <filter class="solr.RemoveDuplicatesTokenFilterFactory" />
+     </analyzer>
+   </fieldType>
 
     <!-- fieldType_textSpell_LANGUAGE -->
 
@@ -305,84 +340,56 @@
      $document->id = $hash . '/node/' . $node->nid; -->
 
    <field name="id" type="string" indexed="true" stored="true" required="true" />
-   <!-- entity_id is tlong, since in some cases we may want to use it as a default sort to
-        get deterministic ordering of results -->
-   <field name="entity_id"  type="tlong" indexed="true" stored="true" required="true" />
-   <!-- entity is 'node', 'file', 'user', or some other Drupal object type -->
-   <field name="entity" type="string" indexed="true" stored="true" required="true" />
+   <!-- entity_id is the numeric object ID, e.g. Node ID, File ID -->
+   <field name="entity_id"  type="long" indexed="true" stored="true" required="true" />
+   <!-- entity_type is 'node', 'file', 'user', or some other Drupal object type -->
+   <field name="entity_type" type="string" indexed="true" stored="true" required="true" />
    <!-- bundle is a node type, or as appropriate for other entity types -->
    <field name="bundle" type="string" indexed="true" stored="true"/>
    <field name="bundle_name" type="string" indexed="true" stored="true"/>
-   <!-- legacy: 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"/>
-   <!-- Copy the bundle to the type so Drupal 6 sites get expected fields in multisite search -->
-   <copyField source="bundle" dest="type"/>
-   <copyField source="bundle_name" dest="type_name"/>
-
 
    <field name="site" type="string" indexed="true" stored="true"/>
    <field name="hash" type="string" indexed="true" stored="true"/>
    <field name="url" type="string" indexed="true" stored="true"/>
-   <!-- title is the default field for a human-readable string for this entity -->
-   <field name="title" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
-   <!-- field_title_LANGUAGE -->
-   <field name="sort_title" type="sortString" indexed="true" stored="false"/>
-   <!-- body is the default field for full text search - dump crap here -->
-   <field name="body" type="text" indexed="true" stored="true" termVectors="true"/>
-   <!-- field_body_LANGUAGE -->
+   <!-- label is the default field for a human-readable string for this entity (e.g. the title of a node) -->
+   <field name="label" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
+   <!-- field_label_LANGUAGE -->
+   <!-- The string version of the title is used for sorting -->
+   <copyField source="label" dest="sort_label"/>
+   <!-- content is the default field for full text search - dump crap here -->
+   <field name="content" type="text" indexed="true" stored="true" termVectors="true"/>
+   <!-- field_content_LANGUAGE -->
    <field name="teaser" type="text" indexed="false" stored="true"/>
 
    <field name="path" type="string" indexed="true" stored="true"/>
-   <field name="path_alias" type="text" indexed="true" stored="true" termVectors="true"/>
+   <field name="path_alias" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
 
  <!-- These are the fields that correspond to a Drupal node. The beauty of having
      Lucene store title, body, type, etc., is that we retrieve them with the search
      result set and don't need to go to the database with a node_load. -->
-   <field name="uid"  type="long" indexed="true" stored="true"/>
-   <field name="name" type="text" indexed="true" stored="true" termVectors="true"/>
-   <field name="sname" type="string" indexed="true" stored="false"/>
-   <field name="sort_name" type="sortString" indexed="true" stored="false"/>
-   <field name="created" type="tdate" indexed="true" stored="true"/>
-   <field name="changed" type="tdate" indexed="true" stored="true"/>
-   <field name="last_comment_or_change" type="tdate" indexed="true" stored="true"/>
-   <field name="nid"  type="long" indexed="true" stored="true"/>
-   <field name="status" type="boolean" indexed="true" stored="true"/>
-   <field name="promote" type="boolean" indexed="true" stored="true"/>
-   <field name="moderate" type="boolean" indexed="true" stored="true"/>
-   <field name="sticky" type="boolean" indexed="true" stored="true"/>
-   <field name="tnid"  type="long" indexed="true" stored="true"/>
-   <field name="translate" type="boolean" indexed="true" stored="true"/>
-   <field name="language" type="string" indexed="true" stored="true"/>
-   <field name="comment_count" type="tint" indexed="true" stored="true"/>
+
    <field name="tid"  type="long" indexed="true" stored="true" multiValued="true"/>
-   <field name="vid"  type="long" indexed="true" stored="true" multiValued="true"/>
+
    <field name="taxonomy_names" type="text" indexed="true" stored="false" termVectors="true" multiValued="true" omitNorms="true"/>
    <!-- field_taxonomy_names_LANGUAGE -->
-   <!-- The string version of the title is used for sorting -->
-   <copyField source="title" dest="sort_title"/>
-   <!-- The string versions of the name used for sorting/multi-site facets -->
-   <copyField source="name" dest="sname"/>
-   <copyField source="name" dest="sort_name"/>
    <!-- Copy terms to a single field that contains all taxonomy term names -->
-   <copyField source="ts_vid_*" dest="taxonomy_names"/>
    <copyField source="tm_vid_*" dest="taxonomy_names"/>
 
    <!-- Here, default is used to create a "timestamp" field indicating
         when each document was indexed.-->
-   <field name="timestamp" type="date" indexed="true" stored="true" default="NOW" multiValued="false"/>
+   <field name="timestamp" type="tdate" indexed="true" stored="true" default="NOW" multiValued="false"/>
 
 	<!-- This field is used to build the spellchecker index -->
    <field name="spell" type="textSpell" indexed="true" stored="true" multiValued="true"/>
    <!-- field_spell_LANGUAGE -->
-   
+  
   <!-- copyField commands copy one field to another at the time a document
         is added to the index.  It's used either to index the same field differently,
         or to add multiple fields to the same field for easier/faster searching.  -->
-   <copyField source="title" dest="spell"/>
-   <!-- copyField_title_LANGUAGE_spell_LANGUAGE -->
-   <copyField source="body" dest="spell"/>
-   <!-- copyField_body_LANGUAGE_spell_LANGUAGE -->
+   <copyField source="label" dest="spell"/>
+   <!-- copyField_label_LANGUAGE_spell_LANGUAGE -->
+   <copyField source="content" dest="spell"/>
+   <!-- copyField_content_LANGUAGE_spell_LANGUAGE -->
 
    <!-- Dynamic field definitions.  If a field name is not found, dynamicFields
         will be used if the name matches any of the patterns.
@@ -394,55 +401,73 @@
 
    <!-- A set of fields to contain text extracted from HTML tag contents which we
         can boost at query time. -->
-   <dynamicField name="tags_*" type="text" indexed="true" stored="false" omitNorms="true"/>
+   <dynamicField name="tags_*" type="text"   indexed="true" stored="false" omitNorms="true"/>
    <!-- dynamicField_tags_LANGUAGE_* -->
-   
-   <!-- We use long everywhere we used int previously since 64 bit ints are now typical in PHP. -->
-   <dynamicField name="is_*"  type="long" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="im_*"  type="long" indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="sis_*" type="slong"    indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="sim_*" type="slong"    indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="ss_*"  type="string"    indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="sm_*"  type="string"    indexed="true"  stored="true" multiValued="true"/>
+
+   <!-- For 2 and 3 letter prefix dynamic fields, the 1st letter indicates the data type and
+        the last letter is 's' for single valued, 'm' for multi-valued -->
+
+   <!-- We use long for integer since 64 bit ints are now common in PHP. -->
+   <dynamicField name="is_*"  type="long"    indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="im_*"  type="long"    indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="iss_*" type="slong"   indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="ism_*" type="slong"   indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="ss_*"  type="string"  indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="sm_*"  type="string"  indexed="true"  stored="true" multiValued="true"/>
+   <!-- Normal text fields are for full text - the relevance of a match depends on the length of the text -->
    <dynamicField name="ts_*"  type="text"    indexed="true"  stored="true" multiValued="false" termVectors="true"/>
    <!-- dynamicField_ts_LANGUAGE_* -->
    <dynamicField name="tm_*"  type="text"    indexed="true"  stored="true" multiValued="true" termVectors="true"/>
    <!-- dynamicField_tm_LANGUAGE_* -->
-   <dynamicField name="tsen2k_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="false" omitNorms="true" omitTermFreqAndPositions="true" />
-   <dynamicField name="twsm_*" type="text_ws" indexed="true" stored="true" multiValued="true"/>
-   <dynamicField name="ds_*" type="tdate"    indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="dm_*" type="tdate"    indexed="true"  stored="true" multiValued="true"/>
+   <!-- Unstemmed text fields for full text - the relevance of a match depends on the length of the text -->
+   <dynamicField name="tus_*" type="text_und" indexed="true"  stored="true" multiValued="false" termVectors="true"/>
+   <dynamicField name="tum_*" type="text_und" indexed="true"  stored="true" multiValued="true" termVectors="true"/>
+   <!-- These text fields omit norms - useful for extracted text like taxonomy_names -->
+   <dynamicField name="tos_*" type="text"    indexed="true"  stored="true" multiValued="false" termVectors="true" omitNorms="true"/>
+   <dynamicField name="tom_*" type="text"    indexed="true"  stored="true" multiValued="true" termVectors="true" omitNorms="true"/>
+   <!-- Special-purpose text fields -->
+   <dynamicField name="tes_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="false" omitTermFreqAndPositions="true" />
+   <dynamicField name="tem_*" type="edge_n2_kw_text" indexed="true" stored="true" multiValued="true" omitTermFreqAndPositions="true" />
+   <dynamicField name="tws_*" type="text_ws" indexed="true" stored="true" multiValued="false"/>
+   <dynamicField name="twm_*" type="text_ws" indexed="true" stored="true" multiValued="true"/>
+   <!-- trie dates are preferred, so give them the 2 letter prefix -->
+   <dynamicField name="ds_*"  type="tdate"   indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="dm_*"  type="tdate"   indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="bm_*"  type="boolean" indexed="true"  stored="true" multiValued="true"/>
    <dynamicField name="bs_*"  type="boolean" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="fs_*"  type="sfloat"  indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="fm_*"  type="sfloat"  indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="ps_*"  type="sdouble" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="pm_*"  type="sdouble" indexed="true"  stored="true" multiValued="true"/>
-
-   <dynamicField name="tis_*"  type="tlong" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="tim_*"  type="tlong" indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="tfs_*"  type="tfloat"  indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="tfm_*"  type="tfloat"  indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="tps_*"  type="tdouble" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="tpm_*"  type="tdouble" indexed="true"  stored="true" multiValued="true"/>
-
+   <dynamicField name="its_*" type="tlong"   indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="itm_*" type="tlong"   indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="fts_*" type="tfloat"  indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="ftm_*" type="tfloat"  indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="pts_*" type="tdouble" indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="ptm_*" type="tdouble" indexed="true"  stored="true" multiValued="true"/>
+   <!-- Binary fields can be populated using base64 encoded data. Useful e.g. for embedding
+        a small image in a search result using the data URI scheme -->
+   <dynamicField name="xs_*"  type="binary"  indexed="false" stored="true" multiValued="false"/>
+   <dynamicField name="xm_*"  type="binary"  indexed="false" stored="true" multiValued="true"/>
+   <!-- In rare cases a sfloat rather than tfloat is needed for sortMissingLast -->
+   <dynamicField name="fss_*" type="sfloat"  indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="fsm_*" type="sfloat"  indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="pss_*" type="sdouble" indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="psm_*" type="sdouble" indexed="true"  stored="true" multiValued="true"/>
    <!-- In rare cases a date rather than tdate is needed for sortMissingLast -->
    <dynamicField name="dds_*" type="date"    indexed="true"  stored="true" multiValued="false"/>
    <dynamicField name="ddm_*" type="date"    indexed="true"  stored="true" multiValued="true"/>
-   <!-- In case a 32 bit int is really needed, we provide these fields -->
-   <dynamicField name="iis_*"  type="integer" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="iim_*"  type="integer" indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="isis_*" type="sint"    indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="isim_*" type="sint"    indexed="true"  stored="true" multiValued="true"/>
-   <dynamicField name="itis_*"  type="tint" indexed="true"  stored="true" multiValued="false"/>
-   <dynamicField name="itim_*"  type="tint" indexed="true"  stored="true" multiValued="true"/>
+   <!-- In case a 32 bit int is really needed, we provide these fields. 'h' is mnemonic for 'half word', i.e. 32 bit on 64 arch -->
+   <dynamicField name="hs_*" type="integer" indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="hm_*" type="integer" indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="hss_*" type="sint"   indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="hsm_*" type="sint"   indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="hts_*" type="tint"   indexed="true"  stored="true" multiValued="false"/>
+   <dynamicField name="htm_*" type="tint"   indexed="true"  stored="true" multiValued="true"/>
+
    <!-- Sortable version of the dynamic string field -->
-   <dynamicField name="sort_ss_*" type="sortString" indexed="true" stored="false"/>
-   <copyField source="ss_*" dest="sort_ss_*"/>
+   <dynamicField name="sort_*" type="sortString" indexed="true" stored="false"/>
+   <copyField source="ss_*" dest="sort_*"/>
   <!-- A random sort field -->
    <dynamicField name="random_*" type="rand" indexed="true" stored="true"/>
-   <!-- This field is used to store node access records, as opposed to CCK field data -->
-   <dynamicField name="nodeaccess*" type="integer" indexed="true" stored="false" multiValued="true"/>
+   <!-- This field is used to store access information (e.g. node access grants), as opposed to field data -->
+   <dynamicField name="access_*" type="integer" indexed="true" stored="false" multiValued="true"/>
 
    <!-- The following causes solr to ignore any fields that don't already match an existing
         field name or dynamic field, rather than reporting them as an error.
@@ -458,7 +483,7 @@
  <uniqueKey>id</uniqueKey>
 
  <!-- field for the QueryParser to use when an explicit fieldname is absent -->
- <defaultSearchField>body</defaultSearchField>
+ <defaultSearchField>content</defaultSearchField>
 
  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  <solrQueryParser defaultOperator="AND"/>
diff --git a/resources/solrconfig.xml b/resources/solrconfig.xml
index 68e43df..07e3822 100644
--- a/resources/solrconfig.xml
+++ b/resources/solrconfig.xml
@@ -101,10 +101,8 @@
     <useCompoundFile>false</useCompoundFile>
     <ramBufferSizeMB>32</ramBufferSizeMB>
     <mergeFactor>4</mergeFactor>
-    <!-- Deprecated -->
-    <!--<maxBufferedDocs>1000</maxBufferedDocs>-->
     <maxMergeDocs>2147483647</maxMergeDocs>
-    <maxFieldLength>10000</maxFieldLength>
+    <maxFieldLength>20000</maxFieldLength>
 
     <!-- If true, unlock any held write or commit locks on startup. 
          This defeats the locking mechanism that allows multiple
@@ -407,6 +405,7 @@
     <!-- default values for query parameters -->
      <lst name="defaults">
        <str name="echoParams">explicit</str>
+       <bool name="omitHeader">true</bool>
        <!--
        <int name="rows">10</int>
        <str name="fl">*</str>
@@ -446,22 +445,21 @@
     <lst name="defaults">
      <str name="defType">dismax</str>
      <str name="echoParams">explicit</str>
+     <bool name="omitHeader">true</bool>
     </lst>
   </requestHandler>
 
   <!-- Note how you can register the same handler multiple times with
        different names (and different init parameters)
     -->
-  <requestHandler name="partitioned" class="solr.SearchHandler" default="true">
+  <requestHandler name="drupal" class="solr.SearchHandler" default="true">
     <lst name="defaults">
      <str name="defType">dismax</str>
      <str name="echoParams">explicit</str>
+     <bool name="omitHeader">true</bool>
      <float name="tie">0.01</float>
-     <str name="qf">
-        body^40.0 title^5.0 name^3.0 taxonomy_names^2.0 tags_h1^5.0 tags_h2_h3^3.0 tags_h4_h5_h6^2.0 tags_inline^1.0
-     </str>
      <str name="pf">
-        body^2.0
+        content^2.0
      </str>
      <int name="ps">15</int>
      <!-- Abort any searches longer than 4 seconds -->
@@ -473,18 +471,18 @@
 
    <!-- example highlighter config, enable per-query with hl=true -->
      <str name="hl">true</str>
-     <str name="hl.fl">body</str>
+     <str name="hl.fl">content</str>
      <int name="hl.snippets">3</int>
      <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">teaser</str>
-     <str name="f.body.hl.maxAlternateFieldLength">256</str>
+     <str name="f.content.hl.alternateField">teaser</str>
+     <str name="f.content.hl.maxAlternateFieldLength">256</str>
      <!-- JS: I wasn't getting good results here... I'm turning off for now
      because I was getting periods (.) by themselves at the beginning of
      snippets and don't feel like debugging anymore.  Without the regex is
      faster too -->
-     <!--<str name="f.body.hl.fragmenter">regex</str>--> <!-- defined below -->
+     <!--<str name="f.content.hl.fragmenter">regex</str>--> <!-- defined below -->
 
     <!-- By default, don't spell check -->
       <str name="spellcheck">false</str>
@@ -574,6 +572,8 @@
     
   </searchComponent>
 
+  <queryConverter name="queryConverter" class="solr.SpellingQueryConverter"/>
+
   <!-- 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" >
-- 
1.7.1

