Advertisement
Guest User

my solr config

a guest
Jun 5th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.39 KB | None | 0 0
  1. data-config:
  2.  
  3. <dataConfig>
  4.   <dataSource type="JdbcDataSource"
  5. driver="com.mysql.jdbc.Driver"
  6. url="jdbc:mysql://localhost/xxxx"
  7. batchSize="-1"
  8. user="xxxx"
  9. password="xxxx"/>
  10.  
  11.   <document>
  12.     <entity name="name" query="SELECT id, name FROM name LIMIT 10"></entity>    
  13.     <entity name="title" query="SELECT id AS titleid, title FROM title LIMIT 10"></entity>
  14.   </document>
  15. </dataConfig>
  16.  
  17.  
  18.  
  19. schema.xml
  20.  
  21.  <fields>
  22.    <!-- Valid attributes for fields:
  23.     name: mandatory - the name for the field
  24.     type: mandatory - the name of a previously defined type from the
  25.       <types> section
  26.     indexed: true if this field should be indexed (searchable or sortable)
  27.     stored: true if this field should be retrievable
  28.     multiValued: true if this field may contain multiple values per document
  29.     omitNorms: (expert) set to true to omit the norms associated with
  30.       this field (this disables length normalization and index-time
  31.       boosting for the field, and saves some memory).  Only full-text
  32.       fields or fields that need an index-time boost need norms.
  33.       Norms are omitted for primitive (non-analyzed) types by default.
  34.     termVectors: [false] set to true to store the term vector for a
  35.       given field.
  36.       When using MoreLikeThis, fields used for similarity should be
  37.       stored for best performance.
  38.     termPositions: Store position information with the term vector.  
  39.       This will increase storage costs.
  40.     termOffsets: Store offset information with the term vector. This
  41.       will increase storage costs.
  42.     default: a value that should be used if no value is specified
  43.       when adding a document.
  44.   -->
  45.  
  46.    <field name="id" type="string" indexed="true" stored="true" />
  47.    <field name="name" type="text_general" indexed="true" stored="true" />
  48.    <field name="titleid" type="string" indexed="true" stored="true" />
  49.    <field name="title" type="text_general" indexed="true" stored="true" />
  50.  
  51.    <!-- uncomment the following to ignore any fields that don't already match an existing
  52.        field name or dynamic field, rather than reporting them as an error.
  53.        alternately, change the type="ignored" to some other type e.g. "text" if you want
  54.        unknown fields indexed and/or stored by default -->
  55.    <dynamicField name="*" type="ignored" multiValued="true" />
  56.    
  57.  </fields>
  58.  
  59.  <uniqueKey>id</uniqueKey>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement