11.05.2016 Views

Apache Solr Reference Guide Covering Apache Solr 6.0

21SiXmO

21SiXmO

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$ bin/post -h<br />

Usage: post -c [OPTIONS] <br />

or post -help<br />

collection name defaults to DEFAULT_SOLR_COLLECTION if not specified<br />

OPTIONS<br />

=======<br />

<strong>Solr</strong> options:<br />

-url (overrides collection, host, and port)<br />

-host (default: localhost)<br />

-p or -port (default: 8983)<br />

-commit yes|no (default: yes)<br />

Web crawl options:<br />

-recursive (default: 1)<br />

-delay (default: 10)<br />

Directory crawl options:<br />

-delay (default: 0)<br />

stdin/args options:<br />

-type (default: application/xml)<br />

Other options:<br />

-filetypes [,,...] (default:<br />

xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt<br />

,log)<br />

-params "=[&=...]" (values must be URL-encoded; these<br />

pass through to <strong>Solr</strong> update request)<br />

-out yes|no (default: no; yes outputs <strong>Solr</strong> response to console)<br />

...<br />

Examples<br />

There are several ways to use<br />

bin/post. This section presents several examples.<br />

Indexing XML<br />

Add all documents with file extension .xml to collection or core named gettingstarted.<br />

bin/post -c gettingstarted *.xml<br />

Add all documents with file extension .xml to the gettingstarted collection/core on <strong>Solr</strong> running on port 898<br />

4.<br />

bin/post -c gettingstarted -p 8984 *.xml<br />

Send XML arguments to delete a document from gettingstarted.<br />

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

181

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

Saved successfully!

Ooh no, something went wrong!