11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The bin/post script currently delegates to a standalone Java program called SimplePostTool. This tool,<br />

bundled into a executable JAR, can be run directly using java -jar example/exampledocs/post.jar.<br />

See the help output and take it from there to post files, recurse a website or file system folder, or send direct<br />

commands to a <strong>Solr</strong> server.<br />

$ java -jar example/exampledocs/post.jar -h<br />

SimplePostTool version 5.0.0<br />

Usage: java [SystemProperties] -jar post.jar [-h|-] [<br />

[...]]<br />

.<br />

.<br />

.<br />

Uploading Data with Index Handlers<br />

Index Handlers are Request Handlers designed to add, delete and update documents to the index. In addition to<br />

having plugins for importing rich documents using Tika or from structured data sources using the Data Import<br />

Handler, <strong>Solr</strong> natively supports indexing structured documents in XML, CSV and JSON.<br />

The recommended way to configure and use request handlers is with path based names that map to paths in the<br />

request url. However, request handlers can also be specified with the qt (query type) parameter if the request<br />

Dispatcher is appropriately configured. It is possible to access the same handler using more than one name,<br />

which can be useful if you wish to specify different sets of default options.<br />

A single unified update request handler supports XML, CSV, JSON, and javabin update requests, delegating to<br />

the appropriate ContentStreamLoader based on the Content-Type of the ContentStream.<br />

Topics covered in this section:<br />

UpdateRequestHandler Configuration<br />

XML Formatted Index Updates<br />

Adding Documents<br />

XML Update Commands<br />

Using curl to Perform Updates<br />

Using XSLT to Transform XML Index Updates<br />

JSON Formatted Index Updates<br />

<strong>Solr</strong>-Style JSON<br />

JSON Update Convenience Paths<br />

Transforming and Indexing Custom JSON<br />

CSV Formatted Index Updates<br />

CSV Update Parameters<br />

Indexing Tab-Delimited files<br />

CSV Update Convenience Paths<br />

Nested Child Documents<br />

UpdateRequestHandler Configuration<br />

The default configuration file has the update request handler configured by default.<br />

<br />

<strong>Apache</strong> <strong>Solr</strong> <strong>Reference</strong> <strong>Guide</strong> <strong>6.0</strong><br />

183

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!