Alexandre Rafalovitch created SOLR-12403:
--------------------------------------------
Summary: CSVLoader cannot split fields that contain new lines
Key: SOLR-12403
URL: https://issues.apache.org/jira/browse/SOLR-12403
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: update
Affects Versions: 7.3
Reporter: Alexandre Rafalovitch
It is possible to import CSV that contains newlines in the field content, it
just needs to be escaped.
However, if that field is split, any content from lines after the first is
lost. It does not matter if the split character is new line or anything else,
existing or not.
Example
{code:java}
id,text1,text2
1,"t1.line1
t1.line2
t1.line3",t2
2,t1.oneline,t2.oneline
{code}
{code:java}
// bin/solr create -c splittest
// bin/post -c splittest test.csv (creates
"text1":["t1.line1\nt1.line2\nt1.line3"])
// bin/post -c splittest -params "f.text1.split=true&f.text1.separator=^"
test.csv (creates "text1":["t1.line1"])
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]