lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] [Updated] (SOLR-3672) SimplePostTool: Improvements for posting files
Date Wed, 25 Jul 2012 00:29:34 GMT

     [ https://issues.apache.org/jira/browse/SOLR-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jan Høydahl updated SOLR-3672:
------------------------------

    Summary: SimplePostTool: Improvements for posting files  (was: SimplePostTool: Auto mode)

Here's the new help screen for the patch I'm about to attach
{noformat}
SimplePostTool: version 1.5
Usage: java [SystemProperties] -jar post.jar [<file|folder> [<file|folder>...]]

Supported System Properties and their defaults:
  -Ddata=yes|no (default=files)
  -Dtype=<content-type> (default=application/xml)
  -Durl=<solr-update-url> (default=http://localhost:8983/solr/update)
  -Dauto=yes|no (default=no)
  -Drecursive=yes|no (default=no)
  -Dfiletypes=<type>[,<type>,...] (default=xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,rtf,htm,html)
  -Dparams="<key>=<value>[&<key>=<value>...]" (values must be
URL-encoded)
  -Dcommit=yes|no (default=yes)
  -Doptimize=yes|no (default=no)
  -Dout=yes|no (default=no)

This is a simple command line tool for POSTing raw data to a Solr
port.  Data can be read from files specified as commandline args,
as raw commandline arg strings, or via STDIN.
Examples:
  java -jar post.jar *.xml
  java -Ddata=args  -jar post.jar '<delete><id>42</id></delete>'
  java -Ddata=stdin -jar post.jar < hd.xml
  java -Dtype=text/csv -jar post.jar *.csv
  java -Dtype=application/json -jar post.jar *.json
  java -Durl=http://localhost:8983/solr/update/extract -Dparams=literal.id=a -Dtype=application/pdf
-jar post.jar a.pdf
  java -Dauto=yes -jar post.jar a.pdf
  java -Dauto=yes -Drecursive=yes -jar post.jar afolder
  java -Dauto=yes -Dfiletypes=ppt,html -jar post.jar afolder
The options controlled by System Properties include the Solr
URL to POST to, the Content-Type of the data, whether a commit
or optimize should be executed, and whether the response should
be written to STDOUT. If auto=yes the tool will try to guess type
type and set type and url automatically. When posting rich documents
the file name will be propagated as "resource.name" and also used as "literal.id".
You may override these or any other request parameter through the -Dparams property
{noformat}

*-Dauto=yes* : Will guess file type from file name suffix, and set type and url accordingly.
It also sets the ID and file name automatically
*-Drecursive=yes* : Will recurse into sub-folders and index all files
*-Dfiletypes* : Specifies the file types to consider when indexing folders
*-Dparams* : HTTP GET params to add to the request, so you don't need to write the whole URL
again

                
> SimplePostTool: Improvements for posting files
> ----------------------------------------------
>
>                 Key: SOLR-3672
>                 URL: https://issues.apache.org/jira/browse/SOLR-3672
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>             Fix For: 4.0, 5.0
>
>
> Various improvements to make SimplePostTool more useful

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message