[ http://issues.apache.org/jira/browse/SOLR-66?page=all ]

Yonik Seeley updated SOLR-66:
-----------------------------

    Attachment: csv.patch

Here's a first cut on a CSV loader.

You can load the example data file with the following command:
curl http://localhost:8983/solr/upload/csv' --data 
'file=./exampledocs/books.csv'

This version only implements local file uploading.  Perhaps there should be a 
separate URL for actually posting the CSV file itself?

Supported parameters:
file -- name of the file to load (needs to be fully qualified, or relative to 
$CWD)
charset -- default is UTF-8
separator -- default is ,
fieldnames -- can specify or override the names of the columns
header -- "true" if the file contains a header with the fieldnames
skip -- list of fields not to index
map -- maps one value to another.. from:to, either from or to can be empty, 
multiple rules may be specified.
keepEmpty  -- index zero length values
split  -- do CSV splitting on a single field value
encapsulator -- char for optionally encapsulating values (needed if reserved 
char is in val) defaults to "
commit -- automatically commit after loading is finished, default=true

Per-field overrides for params can be specified via
f.field.param for the following params: separator, map, 
keepEmpty,split,encapsulator

> bulk data loader
> ----------------
>
>                 Key: SOLR-66
>                 URL: http://issues.apache.org/jira/browse/SOLR-66
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Yonik Seeley
>         Assigned To: Yonik Seeley
>         Attachments: csv.patch
>
>
> A way to efficiently load simple formatted text files, including CSV files.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to