All Downloads are FREE. Search and download functionalities are using the official Maven repository.

solr.Items.conf.schema.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="utf-8"?>
<schema name="example" version="1.5">
   <fields>
      <field name="id" type="string" indexed="true" stored="true" required="true"
      multiValued="false" />
      <!-- SocialSensor fields -->
      <field name="streamId" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="source" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="title" type="text_en" indexed="true" stored="true" multiValued="false" />
      <field name="description" type="text_en" indexed="true" stored="true" multiValued="false" />
      <field name="tags" type="string" indexed="true" stored="true" multiValued="true" />
      <field name="categories" type="string" indexed="true" stored="true" multiValued="true" />
      <field name="author" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="links" type="string" indexed="false" stored="true" multiValued="true" />
      <field name="popularity" type="string" indexed="false" stored="true" multiValued="true" />
      <field name="mediaLinks" type="string" indexed="false" stored="true" multiValued="true" />
      <field name="publicationTime" type="long" indexed="true" stored="true" multiValued="false" />
      <field name="operation" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="comments" type="text_en" indexed="true" stored="true" multiValued="false" />
      <field name="latitude" type="double" indexed="true" stored="true" multiValued="false" />
      <field name="longitude" type="double" indexed="true" stored="true" multiValued="false" />
      <field name="location" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="text" type="text_en" indexed="true" stored="true" multiValued="true" />
      <field name="mediaIds" type="string" indexed="true" stored="true" multiValued="true" />
      <field name="dyscoId" type="string" indexed="true" stored="true" multiValued="false" />
      <!-- new fields: 27.3.2013 -->
      <field name="sentiment" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="retweetsCount" type="long" indexed="true" stored="true" multiValued="false" />
      <field name="alethiometerScore" type="int" indexed="true" stored="true"
      multiValued="false" />
      <field name="alethiometerUserScore" type="int" indexed="true" stored="true"
      multiValued="false" />
      <field name="authorFullName" type="string" indexed="true" stored="true"
      multiValued="false" />
      <field name="userRole" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="followersCount" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="friendsCount" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="avatarImageSmall" type="string" indexed="true" stored="true"
      multiValued="false" />
      <field name="avatarImage" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="authorScreenName" type="string" indexed="true" stored="true"
      multiValued="false" />
      <field name="people" type="string" indexed="true" stored="true" multiValued="true" />
      <field name="original" type="boolean" indexed="true" stored="true" multiValued="false" />
      <field name="validityScore" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="validityVotes" type="string" indexed="true" stored="true" multiValued="false" />
      <field name="positiveVotes" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="negativeVotes" type="int" indexed="true" stored="true" multiValued="false" />
      <field name="_version_" type="long" indexed="true" stored="true" />
      

		<!-- newshound list id -->
      <field name="lists" type="string" indexed="true" stored="true" multiValued="true" />
      <!-- popularity fields -->
      <field name="popularityShares" type="long" indexed="true" stored="true" multiValued="false" />     
      <field name="popularityLikes" type="long" indexed="true" stored="true" multiValued="false" />
      <field name="popularityComments" type="long" indexed="true" stored="true" multiValued="false" />
      
      <dynamicField name="attr_*" type="text_general" indexed="true" stored="true"
      multiValued="true" />
      <dynamicField name="random_*" type="random" />
   </fields>
   <!-- Field to use to determine and enforce document uniqueness. 
      Unless this field is marked with required="false", it will be a required field
   -->
   <uniqueKey>id</uniqueKey>
   <copyField source="title" dest="text" />
   <types>
      <!-- The StrField type is not analyzed, but indexed/stored verbatim. -->
      <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
      <!-- boolean type: "true" or "false" -->
      <fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" />
      <!--
      Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
    -->
      <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0" />
      <fieldType name="float" class="solr.TrieFloatField" precisionStep="0"
      positionIncrementGap="0" />
      <fieldType name="long" class="solr.TrieLongField" precisionStep="0"
      positionIncrementGap="0" />
      <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0"
      positionIncrementGap="0" />
      <fieldType name="tint" class="solr.TrieIntField" precisionStep="8"
      positionIncrementGap="0" />
      <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8"
      positionIncrementGap="0" />
      <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8"
      positionIncrementGap="0" />
      <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8"
      positionIncrementGap="0" />
      <fieldType name="date" class="solr.TrieDateField" precisionStep="0"
      positionIncrementGap="0" />
      <fieldType name="tdate" class="solr.TrieDateField" precisionStep="6"
      positionIncrementGap="0" />
      <fieldtype name="binary" class="solr.BinaryField" />
      <fieldType name="random" class="solr.RandomSortField" indexed="true" />

      <!-- A text field that only splits on whitespace for exact matching of words -->
      <fieldType name="text_ws" class="solr.TextField" positionIncrementGap="100">
         <analyzer>
            <tokenizer class="solr.WhitespaceTokenizerFactory" />
         </analyzer>
      </fieldType>

      <!-- A general text field that has reasonable, generic
         cross-language defaults: it tokenizes with StandardTokenizer,
         removes stop words from case-insensitive "stopwords.txt"
         (empty by default), and down cases.  At query time only, it
         also applies synonyms. -->
      <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
         <analyzer type="index">
            <tokenizer class="solr.StandardTokenizerFactory" />
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
            enablePositionIncrements="true" />
            <!-- in this example, we will only use synonyms at query time
        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
        -->
            <filter class="solr.LowerCaseFilterFactory" />
         </analyzer>
         <analyzer type="query">
            <tokenizer class="solr.StandardTokenizerFactory" />
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"
            enablePositionIncrements="true" />
            <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
            expand="true" />
            <filter class="solr.LowerCaseFilterFactory" />
         </analyzer>
      </fieldType>
      <!-- A text field with defaults appropriate for English: it
         tokenizes with StandardTokenizer, removes English stop words
         (lang/stopwords_en.txt), down cases, protects words from protwords.txt, and
         finally applies Porter's stemming.  The query time analyzer
         also applies synonyms from synonyms.txt. -->
      <fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
         <analyzer type="index">
            <tokenizer class="solr.StandardTokenizerFactory" />
            <!-- in this example, we will only use synonyms at query time
        <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.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.
        -->
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"
            enablePositionIncrements="true" />
            <filter class="solr.LowerCaseFilterFactory" />
            <filter class="solr.EnglishPossessiveFilterFactory" />
            <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
            <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
        <filter class="solr.EnglishMinimalStemFilterFactory"/>
        -->
            <filter class="solr.PorterStemFilterFactory" />
         </analyzer>
         <analyzer type="query">
            <tokenizer class="solr.StandardTokenizerFactory" />
            <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true"
            expand="true" />
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.txt"
            enablePositionIncrements="true" />
            <filter class="solr.LowerCaseFilterFactory" />
            <filter class="solr.EnglishPossessiveFilterFactory" />
            <filter class="solr.KeywordMarkerFilterFactory" protected="protwords.txt" />
            <!-- Optionally you may want to use this less aggressive stemmer instead of PorterStemFilterFactory:
        <filter class="solr.EnglishMinimalStemFilterFactory"/>
        -->
            <filter class="solr.PorterStemFilterFactory" />
         </analyzer>
      </fieldType>
      <fieldType name="text_en_splitting" class="solr.TextField" positionIncrementGap="100"
      autoGeneratePhraseQueries="true">
         <analyzer type="index">
            <tokenizer class="solr.WhitespaceTokenizerFactory" />
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_en.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="lang/stopwords_en.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>
   </types>
</schema>





© 2015 - 2025 Weber Informatics LLC | Privacy Policy