You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by rw...@apache.org on 2012/03/20 14:54:24 UTC

svn commit: r1302897 [3/5] - in /incubator/stanbol/trunk/demos/ehealth: ./ src/ src/main/ src/main/indexing/ src/main/indexing/config/ src/main/indexing/config/ehealth/ src/main/indexing/config/ehealth/conf/ src/main/resources/ src/main/resources/config/

Propchange: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-FoldToASCII.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-ISOLatin1Accent.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-ISOLatin1Accent.txt?rev=1302897&view=auto
==============================================================================
--- incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-ISOLatin1Accent.txt (added)
+++ incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-ISOLatin1Accent.txt Tue Mar 20 13:54:23 2012
@@ -0,0 +1,246 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Syntax:
+#   "source" => "target"
+#     "source".length() > 0 (source cannot be empty.)
+#     "target".length() >= 0 (target can be empty.)
+
+# example:
+#   "À" => "A"
+#   "\u00C0" => "A"
+#   "\u00C0" => "\u0041"
+#   "ß" => "ss"
+#   "\t" => " "
+#   "\n" => ""
+
+# À => A
+"\u00C0" => "A"
+
+# Á => A
+"\u00C1" => "A"
+
+# Â => A
+"\u00C2" => "A"
+
+# Ã => A
+"\u00C3" => "A"
+
+# Ä => A
+"\u00C4" => "A"
+
+# Å => A
+"\u00C5" => "A"
+
+# Æ => AE
+"\u00C6" => "AE"
+
+# Ç => C
+"\u00C7" => "C"
+
+# È => E
+"\u00C8" => "E"
+
+# É => E
+"\u00C9" => "E"
+
+# Ê => E
+"\u00CA" => "E"
+
+# Ë => E
+"\u00CB" => "E"
+
+# Ì => I
+"\u00CC" => "I"
+
+# Í => I
+"\u00CD" => "I"
+
+# Î => I
+"\u00CE" => "I"
+
+# Ï => I
+"\u00CF" => "I"
+
+# IJ => IJ
+"\u0132" => "IJ"
+
+# Ð => D
+"\u00D0" => "D"
+
+# Ñ => N
+"\u00D1" => "N"
+
+# Ò => O
+"\u00D2" => "O"
+
+# Ó => O
+"\u00D3" => "O"
+
+# Ô => O
+"\u00D4" => "O"
+
+# Õ => O
+"\u00D5" => "O"
+
+# Ö => O
+"\u00D6" => "O"
+
+# Ø => O
+"\u00D8" => "O"
+
+# Π=> OE
+"\u0152" => "OE"
+
+# Þ
+"\u00DE" => "TH"
+
+# Ù => U
+"\u00D9" => "U"
+
+# Ú => U
+"\u00DA" => "U"
+
+# Û => U
+"\u00DB" => "U"
+
+# Ü => U
+"\u00DC" => "U"
+
+# Ý => Y
+"\u00DD" => "Y"
+
+# Ÿ => Y
+"\u0178" => "Y"
+
+# à => a
+"\u00E0" => "a"
+
+# á => a
+"\u00E1" => "a"
+
+# â => a
+"\u00E2" => "a"
+
+# ã => a
+"\u00E3" => "a"
+
+# ä => a
+"\u00E4" => "a"
+
+# å => a
+"\u00E5" => "a"
+
+# æ => ae
+"\u00E6" => "ae"
+
+# ç => c
+"\u00E7" => "c"
+
+# è => e
+"\u00E8" => "e"
+
+# é => e
+"\u00E9" => "e"
+
+# ê => e
+"\u00EA" => "e"
+
+# ë => e
+"\u00EB" => "e"
+
+# ì => i
+"\u00EC" => "i"
+
+# í => i
+"\u00ED" => "i"
+
+# î => i
+"\u00EE" => "i"
+
+# ï => i
+"\u00EF" => "i"
+
+# ij => ij
+"\u0133" => "ij"
+
+# ð => d
+"\u00F0" => "d"
+
+# ñ => n
+"\u00F1" => "n"
+
+# ò => o
+"\u00F2" => "o"
+
+# ó => o
+"\u00F3" => "o"
+
+# ô => o
+"\u00F4" => "o"
+
+# õ => o
+"\u00F5" => "o"
+
+# ö => o
+"\u00F6" => "o"
+
+# ø => o
+"\u00F8" => "o"
+
+# œ => oe
+"\u0153" => "oe"
+
+# ß => ss
+"\u00DF" => "ss"
+
+# þ => th
+"\u00FE" => "th"
+
+# ù => u
+"\u00F9" => "u"
+
+# ú => u
+"\u00FA" => "u"
+
+# û => u
+"\u00FB" => "u"
+
+# ü => u
+"\u00FC" => "u"
+
+# ý => y
+"\u00FD" => "y"
+
+# ÿ => y
+"\u00FF" => "y"
+
+# ff => ff
+"\uFB00" => "ff"
+
+# fi => fi
+"\uFB01" => "fi"
+
+# fl => fl
+"\uFB02" => "fl"
+
+# ffi => ffi
+"\uFB03" => "ffi"
+
+# ffl => ffl
+"\uFB04" => "ffl"
+
+# ſt => ft
+"\uFB05" => "ft"
+
+# st => st
+"\uFB06" => "st"

Propchange: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/mapping-ISOLatin1Accent.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/protwords.txt
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/protwords.txt?rev=1302897&view=auto
==============================================================================
--- incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/protwords.txt (added)
+++ incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/protwords.txt Tue Mar 20 13:54:23 2012
@@ -0,0 +1,19 @@
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#-----------------------------------------------------------------------
+# Use a protected word file to protect against the stemmer reducing two
+# unrelated words to the same base word.
+
+# Some non-words that normally won't be encountered,
+# just to test that they won't be stemmed.
+

Propchange: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/protwords.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/schema.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/schema.xml?rev=1302897&view=auto
==============================================================================
--- incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/schema.xml (added)
+++ incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/schema.xml Tue Mar 20 13:54:23 2012
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--  
+ This is the Solr schema file. This file should be named "schema.xml" and
+ should be in the conf directory under the solr home
+ (i.e. ./solr/conf/schema.xml by default) 
+ or located where the classloader for the Solr webapp can find it.
+
+ This schema will be used by the Apache Stanbol SolrYard implementation to
+ index entities.
+ The implementation of the SolrYard does made several assumptions on
+ configurations defined in this Schema. So changes to this schema that do
+ affect such assumptions will most likelly cause unpredictable errors!
+ 
+ However there are also a lot of places where users can optimize this schema
+ to specific requirements. See the comments within this schema for more
+ details!
+
+ For more information, on how to customize this file, please see
+ http://wiki.apache.org/solr/SchemaXml
+
+-->
+
+<schema name="Apache Stanbol SolrYard Schema" version="1.3">
+  <!--
+    The SolrYard supports a list of types that is reflected by
+    "fieldType" specifications within this schema.
+    See the specific fieldType definition for more information
+  -->
+  <types>
+    <!-- 
+      This fieldType is used to store values with the dataType "xsd:string".
+      It is NOT used for natural language texts. Assume that this data type is
+      used for ISBN numbers, article numbers, string representations of
+      unsupported data types ...
+    -->
+    <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
+    <fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="false"/>    
+
+    <!-- 
+      This can be used as alternative to "string" to enable case insensitive
+      searches on string values.
+      The KeywordTokenizerFactory ensures that the whole string is preserved as
+      a single token.
+    -->
+    <!-- lowercases the entire field value, keeping it as a single token.  -->
+    <fieldType name="lowercase" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer>
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory" />
+      </analyzer>
+    </fieldType>
+
+
+    <!-- boolean type: "true" or "false" used to store values with the datatype "xsd:boolean" -->
+    <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true"/>
+    <!--Binary data type. The data should be sent/retrieved in as Base64 encoded Strings.
+        Currently not used by the SolrYard implementation, but reserved for future use. -->
+    <fieldtype name="binary" class="solr.BinaryField"/>
+
+    <!--
+      Default numeric and date field types. By default used to index numeric values.
+      Note that the "solr.TrieIntField" does support indexing values at various
+      levels of precision to accelerate range queries. However the
+      precisionStep of 0 used by this fieldTypes disables this feature.
+      Change presisionStep to values > 0 to activate hierarchival indexing
+      for all numeric fields of that types. See Solr documentation for
+      suitable values and examples.
+    -->
+    <fieldType name="int" 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"/>
+    <fieldType name="date" class="solr.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
+
+    <!--
+     Numeric field types that index each value at various levels of precision
+     to accelerate range queries when the number of values between the range
+     endpoints is large. See the javadoc for NumericRangeQuery for internal
+     implementation details.
+
+     Smaller precisionStep values (specified in bits) will lead to more tokens
+     indexed per value, slightly larger index size, and faster range queries.
+     A precisionStep of 0 disables indexing at different precision levels.
+    -->
+    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" omitNorms="true" positionIncrementGap="0"/>
+    <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>
+
+    <!-- not used
+    <fieldType name="random" class="solr.RandomSortField" indexed="true" />
+     -->
+
+    <!-- 
+      Natural Language Texts
+      
+      Indexing of natural language texts are supported by the solr.TextField class that
+      allows the specification of custom text analyzers specified as a tokenizer and a 
+      list of token filters.
+      
+      For more info on customizing your analyzer chain, please see
+      http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
+      
+      The SolrYard has support for different languages. Within the schema.xml one need
+      to define first a "fieldType" for language and second a dynamicField for the
+      prefix used by the SolrYard for this language.
+      For more information about the prefixes used by the SolrYard see the notes in the
+      field section of this configuration.
+      
+      In addition the SolrYard also indexes natural language values (of any language)
+      together with string values within a special field to support searches for
+      texts without an specified language.
+    -->
+
+    <!-- A text field that only splits on whitespace for exact matching of words 
+        Currently not used. May be used as an alternative to the textgen fieldType.
+    <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+      </analyzer>
+    </fieldType> -->
+
+    <!--
+        Default Text field configuration that comes with the Solr distribution. Currently
+        Not used by the SolrYard
+        
+          
+        A text field that uses WordDelimiterFilter to enable splitting and matching of
+        words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
+        so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
+        Synonyms and stopwords are customized by external files, and stemming is enabled.
+        The attribute autoGeneratePhraseQueries="true" (the default) causes words that get split to
+        form phrase queries. For example, WordDelimiterFilter splitting text:pdp-11 will cause the parser
+        to generate text:"pdp 11" rather than (text:PDP OR text:11).
+        NOTE: autoGeneratePhraseQueries="true" tends to not work well for non whitespace delimited languages.
+    <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true" omitNorms="false">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" />
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.PorterStemFilterFactory"/>
+      </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" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.PorterStemFilterFactory"/>
+      </analyzer>
+    </fieldType>  -->
+
+
+    <!-- 
+         ENGLISH
+     
+         This is the default fieldType used for english language texts.
+         
+         Less flexible matching, but less false matches.  Probably not ideal for product names,
+         but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+    <fieldType name="text_en_Tight" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>
+        <filter class="solr.HyphenatedWordsFilterFactory"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="0" generateNumberParts="0" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
+        <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt"/>
+        <filter class="solr.EnglishMinimalStemFilterFactory"/>
+        <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
+             possible with WordDelimiterFilter in conjuncton with stemming. -->
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+      <!--
+           GERMAN
+       
+           This is the default fieldType used for gernam language texts.
+       
+           Less flexible matching, but less false matches.  Probably not ideal for product names,
+           but may be good for SKUs.  Can insert dashes in the wrong place and still match. -->
+    <fieldType name="text_de" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer type="index">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms_de.txt" ignoreCase="true" expand="false"/>
+        <filter class="solr.HyphenatedWordsFilterFactory"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_de.txt" enablePositionIncrements="true" />
+        <filter class="solr.GermanStemFilterFactory"/>
+        <!-- this filter can remove any duplicate tokens that appear at the same position - sometimes
+         possible with WordDelimiterFilter in conjuncton with stemming. -->
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_de.txt" enablePositionIncrements="true" />
+        <filter class="solr.GermanStemFilterFactory"/>	
+        <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
+      </analyzer>
+    </fieldType>
+
+
+    <!-- 
+         GENERIC (no specific lanugage support)
+     
+         The default for any language without a special field definition.
+         
+         Uses the ICUTokenizer and tries to convert alphabetic, numeric, and symbolic Unicode characters which 
+         are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII 
+         equivalents, if one exists. (STANBOL-
+         (see http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/analysis/ASCIIFoldingFilter.html)
+
+     	-->
+    <fieldType name="textgen" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer type="index">
+        <tokenizer class="solr.ICUTokenizerFactory"/>
+        <filter class="solr.ASCIIFoldingFilterFactory"/>
+          <filter class="solr.HyphenatedWordsFilterFactory"/>
+<!--        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/> -->
+<!--        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/> -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+      <analyzer type="query">
+        <tokenizer class="solr.ICUTokenizerFactory"/>
+        <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
+        <filter class="solr.ASCIIFoldingFilterFactory"/>
+<!--        <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true"/> -->
+<!--        <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/> -->
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    <!-- intended to be used for labels of drugs -->
+    <fieldType name="label" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.ASCIIFoldingFilterFactory"/>
+        <filter class="solr.WordDelimiterFilterFactory" 
+            catenateWords="1" catenateNumbers="1" catenateAll="1" 
+            generateWordParts="1" generateNumberParts="0"
+            splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="0" 
+            preserveOriginal="0" />
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType>
+    
+    <!-- Field Type used for searching Drugs based on their variouse IDs -->
+    <fieldType name="code_field" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer>
+        <tokenizer class="solr.WhitespaceTokenizerFactory"/>
+        <filter class="solr.ASCIIFoldingFilterFactory"/>
+        <filter class="solr.WordDelimiterFilterFactory" 
+            catenateWords="1" catenateNumbers="1" catenateAll="1" 
+            generateWordParts="1" generateNumberParts="0"
+            splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="0" 
+            preserveOriginal="0" />
+      </analyzer>
+    </fieldType>
+
+    <!-- A general unstemmed text field that indexes tokens normally and also
+         reversed (via ReversedWildcardFilterFactory), to enable more efficient 
+	 leading wildcard queries.
+     
+     Not used 
+    <fieldType name="text_rev" 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" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+        <filter class="solr.ReversedWildcardFilterFactory" withOriginal="true" maxPosAsterisk="3" maxPosQuestion="2" maxFractionAsterisk="0.33"/>
+      </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" generateWordParts="1" generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0" splitOnCaseChange="0"/>
+        <filter class="solr.LowerCaseFilterFactory"/>
+      </analyzer>
+    </fieldType> -->
+
+    <!-- A KeywordTokenizer that does not include some properties of the source text.
+         
+         TODO:
+          - This might be usefull for searching labels
+          - Rename to label if used for that
+          - Add 0-9 to the regex patter to preserve numbers
+         
+      -->
+    <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="false">
+      <analyzer>
+        <!-- KeywordTokenizer does not tokenize -->
+        <tokenizer class="solr.KeywordTokenizerFactory"/>
+        <filter class="solr.LowerCaseFilterFactory" />
+        <filter class="solr.TrimFilterFactory" />
+        <filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all" />
+      </analyzer>
+    </fieldType>
+    
+    <!-- not used
+    <fieldtype name="phonetic" stored="false" indexed="true" class="solr.TextField" >
+      <analyzer>
+        <tokenizer class="solr.StandardTokenizerFactory"/>
+        <filter class="solr.DoubleMetaphoneFilterFactory" inject="false"/>
+      </analyzer>
+    </fieldtype> -->
+
+    <fieldType name="text_path" class="solr.TextField" positionIncrementGap="100" omitNorms="false">
+      <analyzer>
+        <tokenizer class="solr.PathHierarchyTokenizerFactory"/>
+      </analyzer>
+    </fieldType>
+
+    <!-- since fields of this type are by default not stored or indexed,
+         any data added to them will be ignored outright.  --> 
+    <fieldtype name="ignored" stored="false" indexed="false" multiValued="true" class="solr.StrField" />
+
+    <!-- Spatial features are not yet supported by the Entityhub
+    <fieldType name="point" class="solr.PointType" dimension="2" subFieldSuffix="_d"/>
+    <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
+    <fieldtype name="geohash" class="solr.GeoHashField"/>
+     -->
+ </types>
+
+
+ <fields>
+   <!-- 
+     For Information about the different attributes for fields
+     see http://wiki.apache.org/solr/SchemaXml. 
+   -->
+    <!--
+      The uri field is used as ID for documents indexed by the SolrYard.
+      Do not change this definition!
+    -->
+   <field name="uri" type="string" indexed="true" stored="true" required="true" />
+
+   <!-- 
+     used to index all natural language texts of all fields of a document
+    (via copyField). This is used as default search field.
+    The type may be changed.
+     -->
+   <field name="_text" type="textgen" indexed="true" stored="false" multiValued="true" termVectors="true"/>
+   <!-- 
+     used to store all references of the document (via copyField).
+     This field may be used to search for related entities.
+     Do not change this definition!
+    -->
+   <field name="_ref" type="string" indexed="true" stored="false" multiValued="true"/>
+   <!-- 
+     Field used to store the domain in case multiple datasets are stored witin the same
+     Solr index (search for "Multi Yard Layout" for details).
+     Do not change this definition!
+   -->
+   <field name="_domain" type="string" indexed="true" stored="false" multiValued="true"/>
+   
+   <!-- fields that store codes -->
+   <field name="@/skos:notation/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:ahfsCode/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:atcCode/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:dpdDrugIdNumber/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:hetId/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:inchiKey/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:limsDrugId/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:pdbHomologyId/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:primaryAccessionNo/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:secondaryAccessionNumber/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+
+   <field name="@/sider:stitchId/" type="code_field" indexed="true" stored="true" multiValued="true"/>
+
+
+
+   <!-- String fields (e.g. chemical formulars)-->
+   <field name="@/drugbank:smilesStringCanonical/" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:smilesStringIsomeric/" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:chemicalIupacName/" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:inchiIdentifier/" type="string" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:chemicalFormula/" type="string" indexed="true" stored="true" multiValued="true"/>
+   
+   <!-- labels -->
+   <field name="@/rdfs:label/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/skos:prefLabel/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/skos:altLabel/" type="label" indexed="true" stored="true" multiValued="true"/>
+
+   <field name="@/drugbank:brandName/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:genericName/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/drugbank:synonym/" type="label" indexed="true" stored="true" multiValued="true"/>
+
+   <field name="@/dailymed:name/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/dailymed:fullName/" type="label" indexed="true" stored="true" multiValued="true"/>
+   <field name="@/dailymed:genericMedicine/" type="label" indexed="true" stored="true" multiValued="true"/>
+   
+   <field name="@/diseasome:name/" type="label" indexed="true" stored="true" multiValued="true"/>
+   
+   <field name="@/sider:drugName/" type="label" indexed="true" stored="true" multiValued="true"/>
+
+
+
+   <!-- 
+     Dynamic field definitions (used if a field name is not found)
+     see http://wiki.apache.org/solr/SchemaXml for details.
+     
+     The SolrYard heavily uses dynamic fields to index fields based on there
+     data type.
+     Notes:
+       - By default all dynamicField specifications use multiValued="true"
+         because this schema.xml does not make any assumptions on the data stored.
+         Even a boolean field may define both "true" and "false" as values.
+       - The SolrYard currently uses only prefixes to represent data types 
+         and languages. However postfixes are reserved for future extensions.
+         That means that postfixes MUST NOT be used for dynamicField definitions
+   -->
+   <!--
+     Used for all fields with boolean data type.
+     One can change multivalued to "false" in case the data indexed do confirm to
+     this restriction
+   -->
+   <dynamicField name="bool/*" type="boolean" indexed="true"  stored="true" multiValued="true"/>
+   <!--
+     Numeric dataTypes.
+     Note that thy type can be changed to fieldTypes supporting hierarchical
+     indexing of values to increase performance of ranged queries
+   -->
+   <dynamicField name="int/*"  type="int"     indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="lon/*"  type="long"    indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="flo/*"  type="float"   indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="dou/*"  type="double"  indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="cal/*"  type="date"    indexed="true"  stored="true" multiValued="true"/>
+   <dynamicField name="dur/*"  type="string"  indexed="true"  stored="true" multiValued="true"/>
+   <!-- 
+     String fields that are not natural language
+     To support case insensitive searches in such fields change 
+     the type to "lowercase"
+   -->
+   <dynamicField name="str/*"  type="string"  indexed="true"  stored="true" multiValued="true" omitNorms="false"/>
+   <!-- 
+     references are values that represent IDs of other resources.
+     Typically this will store URIs but in principle also other IDs
+     could be used.
+   -->
+   <dynamicField name="ref/*"  type="string"  indexed="true"  stored="true" multiValued="true"/>
+
+   <!--
+     DynamicFields representing natural language texts.
+     
+     The type of such fields may be changed to one of the alternatives 
+     descibed in the types section of this configuration.
+
+     The SolrYard prefixes natural language texts with "@"
+     followed by the defined language.
+     Currently no processing of the language is done. So
+     defineing the language "1xx5zr7" for Text will create
+     a field with the prefix "@1xx5zr7".
+     
+     To define a special field type for a language one has
+     to use "@" plus the key for the language as prefix.
+     See the specification for English language texts as example.
+     
+     Also prefixes for country specific languages can be
+     realized by defining dynamic fields like follows:
+       use @en* to match en-GB and en-US
+       use @en/* to match only en but not en-GB or en-US
+       use @en-GB/* and @en* to have a special field type for 
+         en-GB and one for other english text
+   -->
+   <!-- 
+     Dynamic field for ENGLISH languages.
+     Note that the prefix "@en*" matches also "@en-GB" and "@en-US"
+   -->
+   <dynamicField name="@en*"  type="text_en_Tight" indexed="true" stored="true" multiValued="true" omitNorms="false"/>
+     <!-- 
+      Dynamic field for GERMAN languages.
+      Note that the prefix "@en*" matches also "@en-GB" and "@en-US"
+      -->
+     <dynamicField name="@de*"  type="text_de" indexed="true" stored="true" multiValued="true" omitNorms="false"/>
+   <!-- 
+     The "@*" catches all the other languages including "@/" 
+     (default language) used for texts without a defined language
+   -->
+   <dynamicField name="@*"  type="textgen"  indexed="true"  stored="true" multiValued="true" omitNorms="false"/>
+
+   <!--
+     To add special configurations for specific fields one
+     has to include the fieldName within the prefix of the
+     dynamicField specification.
+     The SolrYard uses namespace prefixes to generate
+     field names. When defined prefixes defined in the
+     NamespaceEnum of the Entityhub are used.
+     Currently there is no way to define used prefixes for
+     other namespaces.
+     
+     This example shows how to activate lower case search
+     for the dcmi-terms format property
+  <dynamicField name="str/dc:format*" type="lowercase" indexed="true"  stored="true" multiValued="true"/>
+     
+     This example shows how to activate fast ranged queries
+     for spatial searches
+  <dynamicField name="dou/geo:lat*" type="tdouble" indexed="true"  stored="true" multiValued="true"/>
+  <dynamicField name="dou/geo:lon*" type="tdouble" indexed="true"  stored="true" multiValued="true"/>
+  <dynamicField name="int/geo:alt*" type="tint" indexed="true"  stored="true" multiValued="true"/>
+     
+     This example defines to use the type "text_en" for
+     english language rdfs:comment values.
+   
+   <dynamicField name="@en/rdfs:comment*"  type="text_en"  indexed="true"  stored="true" multiValued="true"/>
+     
+     Note that this would not match "en-GB" nor "en-US".
+   -->
+    
+    
+   <!--
+     The following dynamic field specifications define fiedls used
+     by the SolrYard implementation for special purposes.
+   -->
+         
+   <!-- 
+     the "_!@*" fields contain a copy of all languages AND string values
+     for that field. This field is used for text queries with no specified
+     language.
+     This field need not to be stored. The type can be changed to alternatives
+     as described in the types section of this configuration.
+   -->
+   <dynamicField name="_!@*"  type="textgen"  indexed="true"  stored="false" multiValued="true" omitNorms="false"/>
+   <!-- 
+     fields starting with "_config/" are used to store configurations about how the
+     index was created within the index (e.g. used namespace prefixes).
+     Do not change this definition!
+   -->
+   <dynamicField name="_config/*" type="string" indexed="false" multiValued="true"/>
+   
+ </fields>
+
+ <!-- 
+   Field to use to determine and enforce document uniqueness.
+   -->
+ <uniqueKey>uri</uniqueKey>
+
+ <!-- 
+   field for the QueryParser to use when an explicit fieldname is absent.
+   The SolrYard does currently not take advantage of this. However it can
+   be used when directly accessing the SolrYard.
+ -->
+ <defaultSearchField>_text</defaultSearchField>
+
+ <!--
+   The SolrYard explizitly adds AND and OR for all boolean terms in
+   generated queries. So changing that should have no influence on
+   the SolrYard (not tested) 
+   
+   SolrQueryParser configuration: defaultOperator="AND|OR" 
+ -->
+ <solrQueryParser defaultOperator="OR"/>
+
+  <!--
+    The SolrYard Implementation assumes the following copyField commands.
+    This commands MUST NOT be removed! 
+   -->
+
+   <!-- 
+     Values of all fields that represent natural language texts
+     or string values are copied to the default search field
+     "_text".
+     Currently the SolrYard does not use this field, but it is
+     reserved for future useage and MUST therefoer already be
+     included when indexing documents
+   -->
+   <copyField source="@*" dest="_text"/>
+   <copyField source="str/*" dest="_text"/>
+   <!--
+     All references to other entities (documents) need to be
+     copied to the "_ref" field.
+     This field is required to query for dependencies of other
+     documents (e.g. when one needs to remove a docuemnt and
+     all references to it)
+   -->
+   <copyField source="ref/*" dest="_ref"/>
+	
+
+
+</schema>

Propchange: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/schema.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/scripts.conf
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/scripts.conf?rev=1302897&view=auto
==============================================================================
--- incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/scripts.conf (added)
+++ incubator/stanbol/trunk/demos/ehealth/src/main/indexing/config/ehealth/conf/scripts.conf Tue Mar 20 13:54:23 2012
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+user=
+solr_hostname=localhost
+solr_port=8983
+rsyncd_port=18983
+data_dir=
+webapp_name=solr
+master_host=
+master_data_dir=
+master_status_dir=