Hi  Noble,

Thanks for the reply,

As advised I have changed the db-data-config.xml as below. But still the
<str name="">Indexing completed. Added/Updated: 0 documents. Deleted 0
documents.</str>

<dataConfig>
    <dataSource type="FileDataSource" name ="xmlindex"/>
    <document name="products">
     <entity name="xmlfile" processor="FileListEntityProcessor"
fileName="c:\\test\\ipod_other.xml"  recursive="true" rootEntity="false"
dataSource="null" baseDir="${dataimporter.request.xmlDataDir}"
useSolrAddSchema="true">
        <entity name="data" processor="XPathEntityProcessor"
url="${xmlfile.fileAbsolutePath}">
          <field column="manu" name="manu"/>
          </entity>
           </entity>
       </document>
</dataConfig>


Got error as below when baseDir is removed

INFO: last commit = 1242683454570
May 18, 2009 2:55:15 PM org.apache.solr.handler.dataimport.DataImporter
doFullImport
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: 'baseDir' is
a required attribute Pro
cessing Document # 1
        at
org.apache.solr.handler.dataimport.FileListEntityProcessor.init(FileListEntityProcessor.j
ava:76)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:299)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:324)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:382)
        at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:363)
May 18, 2009 2:55:15 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback

Please advise.

Thanks and regards,
Jay

2009/5/17 Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@corp.aol.com>

> hi ,
> u may not need that enclosing entity , if you only wish to index one file.
>
> baseDir is not required if you give absolute path in the fileName.
>
> no need to mention forEach or fields if you set useSolrAddSchema="true"
>
> On Sat, May 16, 2009 at 1:23 AM, jayakeerthi s <mail2keer...@gmail.com>
> wrote:
> > Hi All,
> >
> > I am trying to index the fileds from the xml files, here is the
> > configuration that I am using.
> >
> >
> > db-data-config.xml
> >
> > <dataConfig>
> >    <dataSource type="FileDataSource" name ="xmlindex"/>
> >    <document name="products">
> >     <entity name="xmlfile" processor="FileListEntityProcessor"
> > fileName="c:\test\ipod_other.xml"  recursive="true" rootEntity="false"
> > dataSource="null" baseDir="${dataimporter.request.xmlDataDir}">
> >     <entity name="data" processor="XPathEntityProcessor" forEach="/record
> |
> > /the/record/xpath"  url="${xmlfile.fileAbsolutePath}">
> >            <field column="manu"
> > name="manu"/>
> >
> >     </entity>
> >        </entity>
> >       </document>
> > </dataConfig>
> >
> > Schema.xml has the field "manu"
> >
> > The input xml file used to import the field is
> >
> > <doc>
> >  <field name="id">F8V7067-APL-KIT</field>
> >  <field name="name">Belkin Mobile Power Cord for iPod w/ Dock</field>
> >  <field name="manu">Belkin</field>
> >  <field name="cat">electronics</field>
> >  <field name="cat">connector</field>
> >  <field name="features">car power adapter, white</field>
> >  <field name="weight">4</field>
> >  <field name="price">19.95</field>
> >  <field name="popularity">1</field>
> >  <field name="inStock">false</field>
> > </doc>
> >
> >
> > doing the full-import this is the response I am getting
> >
> > - <lst name="statusMessages">
> >  <str name="Total Requests made to DataSource">0</str>
> >  <str name="Total Rows Fetched">0</str>
> >  <str name="Total Documents Skipped">0</str>
> >  <str name="Full Dump Started">2009-05-15 11:58:00</str>
> >  <str name="">Indexing completed. Added/Updated: 0 documents. Deleted 0
> > documents.</str>
> >  <str name="Committed">2009-05-15 11:58:00</str>
> >  <str name="Optimized">2009-05-15 11:58:00</str>
> >  <str name="Time taken">0:0:0.172</str>
> >  </lst>
> >  <str name="WARNING">This response format is experimental. It is likely
> to
> > change in the future.</str>
> >  </response>
> >
> >
> > Do I missing anything here or is there any format on the input xml,??
> please
> > help resolving this.
> >
> > Thanks and regards,
> > Jay
> >
>
>
>
> --
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
>

Reply via email to