O'Reilly logo

Apache Solr Beginner's Guide by Alfredo Serafini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – importing Solr XML document files

In the previous chapters of this book, we had the chance to produce and save several XML files containing well-formatted Solr documents. A simple idea would be to configure a DataImportHandler to be able to acquire new Solr documents by a specific folder, where we will put them as soon as they are produced.

The basic part of the new configuration will be very similar to the previous one:

<dataSource name="fds" encoding="UTF-8" type="FileDataSource" /> <document> <entity name="files" processor="FileListEntityProcessor" baseDir="${solr.solr.home}/../../resources" fileName=".*\.xml"> <entity pk="uri" name="file" format="text" processor="XPathEntityProcessor" url="${files.fileAbsolutePath}" useSolrAddSchema="true" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required