Over a million developers have joined DZone.
Platinum Partner

Solr DataImportHandler example with FileDataSource

· Big Data Zone

The Big Data Zone is presented by Exaptive.  Learn how rapid data application development can address the data science shortage.

This imports each line of a text file as a single document, probably about the simplest thing you can do. The schema has a single attribute, “name,” which is defined as a unique attribute.

<dataConfig>
<dataSource name=”ds1″ type=”FileDataSource” />
<document>
<entity name=”entity”
processor=”LineEntityProcessor”
url=”E:/Projects/Data/wlist_all/wlist_match10.txt”
dataSource=”ds1″>
<field column=”rawLine” name=”name” />
</entity>
</document>
</dataConfig>

The Big Data Zone is presented by Exaptive.  Learn about how to rapidly iterate data applications, while reusing existing code and leveraging open source technologies.

Topics:

Published at DZone with permission of Gary Sieling , DZone MVB .

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}