Add comments, remove unused
[lui-solr.git] / conf / schema-minimal.xml
index ef8b721..97c7819 100644 (file)
 
 <!-- -->
    <field name="id" type="string" indexed="true" stored="true" required="true" /> 
+   <!-- Solr field -->
    <field name="_version_" type="long" indexed="true" stored="true"/>
+   <!-- harvester fields -->
    <field name="transactionId" type="long" indexed="true" stored="false"/>
    <field name="database" type="string" indexed="true" stored="true"/>
    <field name="harvest-timestamp" type="date"   indexed="true" stored="true"/>
    <field name="harvest-date"      type="string" indexed="true" stored="true"/>
+   
+   <!-- custom payload fields -->
 
+   <!-- Technically not required, but is used in copyField and defaultSearchField below and in solrconfig.xml as default field (df=text) to search --> 
+   <field name="text" type="text" indexed="true" stored="false" multiValued="true"/>
+
+   <!-- * Basically a /dev/null, as it is not stored or indexed. This will prevent Solr to fail add records due to 
+          "unknown field". For strict checking comment out field below.  --> 
+   <field name="*" type="string" indexed="false" stored="false" multiValued="true" />
  </fields>
 
  <!-- Field to use to determine and enforce document uniqueness. 
  <!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
  <solrQueryParser defaultOperator="AND"/>
 
-  <!-- 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="author"  dest="author_exact"/>
-   <copyField source="subject" dest="subject_exact"/>
-   <copyField source="medium"  dest="medium_exact"/>
-   <copyField source="journal-title"   dest="journal-title_exact"/>
-       
    <!-- Above, multiple source fields are copied to the [text] field. 
          Another way to map multiple source fields to the same 
          destination field is to use the dynamic field syntax. 
          copyField also supports a maxChars to copy setting.  -->
           
-   <copyField source="*" dest="text" maxChars="10000"/> 
-
-   <!-- copy name to alphaNameSort, a field designed for sorting by name -->
-   <!-- <copyField source="name" dest="alphaNameSort"/> -->
-
- <!-- Similarity is the scoring routine for each document vs. a query.
-      A custom similarity may be specified here, but the default is fine
-      for most applications.  -->
- <!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
- <!-- ... OR ...
-      Specify a SimilarityFactory class name implementation
-      allowing parameters to be used.
- -->
- <!--
- <similarity class="com.example.solr.CustomSimilarityFactory">
-   <str name="paramkey">param value</str>
- </similarity>
- -->
+   <copyField source="*" dest="text" /> 
+
 </schema>