You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tanweer Noor <ta...@gmail.com> on 2011/10/25 11:12:59 UTC

data import handler issue

Hi,
I am having issue in fetching records from db, I am using *eXist* database.
Please see if you can help in looking into this.

http://localhost:8983/solr/dataimport?command=full-import

<?xml version="1.0" encoding="UTF-8" ?>
 - <http://localhost:8983/solr/lab2/dataimport?command=full-import#> <
response>
 - <http://localhost:8983/solr/lab2/dataimport?command=full-import#> <lstname
="*responseHeader*">
   <int name="*status*">0</int>
   <int name="*QTime*">0</int>
   </lst>
 - <http://localhost:8983/solr/lab2/dataimport?command=full-import#> <lstname
="*initArgs*">
 - <http://localhost:8983/solr/lab2/dataimport?command=full-import#> <lstname
="*defaults*">
   <str name="*config*">data-config.xml</str>
  </lst>
  </lst>
   <str name="*command*">full-import</str>
   <str name="*status*">idle</str>
   <str name="*importResponse*" />
 - <http://localhost:8983/solr/lab2/dataimport?command=full-import#> <lstname
="*statusMessages*">
   <str name="*Total Requests made to DataSource*">1</str>
   <*str name="Total Rows Fetched">0</str>*
   <str name="*Total Documents Skipped*">0</str>
   <str name="*Full Dump Started*">2011-10-25 01:58:24</str>
   *<str name="">Indexing completed. Added/Updated: 0 documents. Deleted 0
documents.</str>*
   <str name="*Committed*">2011-10-25 01:58:24</str>
   <str name="*Optimized*">2011-10-25 01:58:24</str>
   <str name="*Total Documents Processed*">0</str>
   <str name="*Time taken*">0:0:0.219</str>
  </lst>
   <str name="*WARNING*">This response format is experimental. It is likely
to change in the future.</str>
  </response>

below is my data-config.xml file

<dataConfig>
<dataSource type="HttpDataSource" />
<document>
<entity name="LibCatalog"
pk="url"
url="
http://localhost:8081/exist/servlet/db/dbname/?_query=for%20$p%20in%20//Music%20return%20$p
"
processor="XPathEntityProcessor"
forEach="/data/store"
transformer="DateFormatTransformer">
 <field column="url" xpath="/data/store/url" />
   <field column="Library" xpath="/data/store/Library" />
      <field column="Genre" xpath="/data/store/Genre" />
<field column="Artist" xpath="/data/store/Artist" />
  <field column="Year" xpath="/data/store/Year" />
  <field column="Title" xpath="/data/store/Title" />
  <field column="Album" xpath="/data/store/Album" />
  <field column="Music" xpath="/data/store/Music" />
  <field column="Subject" xpath="/data/store/Subject" />
      <field column="Author" xpath="/data/store/Author" />

 </entity>
 </document>
</dataConfig>





If i go to URL, I can see that it is fetching record from database but
somehow, solr is not fetching a single row.

http://localhost:8081/exist/servlet/db/dbname/?_query=for%20$p%20in%20//Music%20return%20$p



Thanks