Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change 
notification.

The following page has been changed by NoblePaul:
http://wiki.apache.org/solr/DataImportHandler

------------------------------------------------------------------------------
  
  {{{
  <dataConfig>
- <dataSource driver="org.hsqldb.jdbcDriver" url="jdbc:mysql://db1-host/dbname" 
user="sa" />
+ <dataSource driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:/temp/example/ex" 
user="sa" />
      <document name="products">
          <entity name="item" pk="ID" query="select * from item">
              <field column="ID" name="id" />
@@ -189, +189 @@

  The shorter version is given below
  {{{
  <dataConfig>
-     <dataSource driver="org.hsqldb.jdbcDriver" 
url="jdbc:mysql://db1-host/dbname" user="sa" />
+     <dataSource driver="org.hsqldb.jdbcDriver" 
url="jdbc:hsqldb:/temp/example/ex" user="sa" />
      <document name="products">
          <entity name="item" pk="ID" query="select * from item">               
     
              <entity name="feature" query="select description as features from 
feature where item_id='${item.ID}'"/>            
@@ -213, +213 @@

  
  {{{
  <dataConfig>
+     <dataSource driver="org.hsqldb.jdbcDriver" 
url="jdbc:hsqldb:/temp/example/ex" user="sa" />
      <document name="products">
            <entity name="item" pk="ID" query="select * from item"
-               deltaQuery="select id from item where last_modified > 
'${dataimporter.last_index_time}'">
+               deltaQuery="select id from item where last_modified > 
'${dataimporter.last_index_time}'">           
-             <field column="ID" name="id" />
-             <field column="NAME" name="name" />
-             <field column="NAME" name="nameSort" />
-             <field column="NAME" name="alphaNameSort" />
-             <field column="MANU" name="manu" />
-             <field column="WEIGHT" name="weight" />
-             <field column="PRICE" name="price" />
-             <field column="POPULARITY" name="popularity" />
-             <field column="INSTOCK" name="inStock" />
-             <field column="INCLUDES" name="includes" />
  
              <entity name="feature" pk="ITEM_ID" 
+                     query="select description as features from feature where 
item_id='${item.ID}'">                
-                     query="select DESCRIPTION from FEATURE where 
ITEM_ID='${item.ID}'">
-                 <field name="features" column="DESCRIPTION" />
              </entity>
              <entity name="item_category" pk="ITEM_ID, CATEGORY_ID"
                      query="select CATEGORY_ID from item_category where 
ITEM_ID='${item.ID}'">
                  <entity name="category" pk="ID"
-                         query="select DESCRIPTION from category where ID = 
'${item_category.CATEGORY_ID}'">
+                        query="select description as cat from category where 
id = '${item_category.CATEGORY_ID}'">                    
-                     <field column="description" name="cat" />
                  </entity>
              </entity>
          </entity>

Reply via email to