Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Solr DataImportHandler example with FileDataSource

DZone's Guide to

Solr DataImportHandler example with FileDataSource

· Big Data Zone
Free Resource

Access NoSQL and Big Data through SQL using standard drivers (ODBC, JDBC, ADO.NET). Free Download 

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 fastest databases need the fastest drivers - learn how you can leverage CData Drivers for high performance NoSQL & Big Data Access.

Topics:

Published at DZone with permission of Gary Sieling, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}