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

Need to build an application around your data? Learn more about dataflow programming for rapid development and greater creativity. 

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>

Check out the Exaptive data application Studio. Technology agnostic. No glue code. Use what you know and rely on the community for what you don't. Try the community version.

Topics:

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

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}