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.

document structure should still be in proper JSON format.<br />

Then you can choose when documents should be added to the index (Commit Within), whether existing<br />

documents should be overwritten with incoming documents with the same id (if this is not true, then the incoming<br />

documents will be dropped), and, finally, if a document boost should be applied.<br />

This option will only add or overwrite documents to the index; for other update tasks, see the <strong>Solr</strong> Command opti<br />

on.<br />

CSV<br />

When using the CSV document type, the functionality is similar to using a requestHandler on the command line.<br />

Instead of putting the documents in a curl command, they can instead be input into the Document entry box. The<br />

document structure should still be in proper CSV format, with columns delimited and one row per document.<br />

Then you can choose when documents should be added to the index (Commit Within), and whether existing<br />

documents should be overwritten with incoming documents with the same id (if this is not true, then the incoming<br />

documents will be dropped).<br />

Document Builder<br />

The Document Builder provides a wizard-like interface to enter fields of a document<br />

File Upload<br />

The File Upload option allows choosing a prepared file and uploading it. If using only /update for the<br />

Request-Handler option, you will be limited to XML, CSV, and JSON.<br />

However, to use the ExtractingRequestHandler (aka <strong>Solr</strong> Cell), you can modify the Request-Handler to /update<br />

/extract. You must have this defined in your solrconfig.xml file, with your desired defaults. You should<br />

also update the &literal.id shown in the Extracting Req. Handler Params so the file chosen is given a<br />

unique id.<br />

Then you can choose when documents should be added to the index (Commit Within), and whether existing<br />

documents should be overwritten with incoming documents with the same id (if this is not true, then the incoming<br />

documents will be dropped).<br />

<strong>Solr</strong> Command<br />

The <strong>Solr</strong> Command option allows you use XML or JSON to perform specific actions on documents, such as<br />

defining documents to be added or deleted, updating only certain fields of documents, or commit and optimize<br />

commands on the index.<br />

The documents should be structured as they would be if using /update on the command line.<br />

XML<br />

When using the XML document type, the functionality is similar to using a requestHandler on the command line.<br />

Instead of putting the documents in a curl command, they can instead be input into the Document entry box. The<br />

document structure should still be in proper <strong>Solr</strong> XML format, with each document separated by tags and<br />

each field defined.<br />

Then you can choose when documents should be added to the index (Commit Within), and whether existing<br />

documents should be overwritten with incoming documents with the same id (if this is not true, then the incoming<br />

documents will be dropped).<br />

This option will only add or overwrite documents to the index; for other update tasks, see the <strong>Solr</strong> Command opti<br />

on.<br />

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

38

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

Saved successfully!

Ooh no, something went wrong!