Yeah, I notiiced that too and tried that as well, and tried it in 4.4 as well, and tried a raw URL in the Chrome browser as well, and it all works fine.

Did you try my example with the standard Solr example schema?

I'm trying to see what's different from your example and mine, other than the field name.

My latest test case was with this URL in Chrome:

http://localhost:8983/solr/update/csv?commit=true&f.features_ss.split=true&f.features_ss.separator=%3A&f.features_ss.encapsulator=%22&stream.contentType=text/csv&stream.file=test.csv

With this content for test.csv:

id,name,features_ss,junk_s
doc-1,doc1,"feat1:feat2",junk

Can you confirm whether this exact case works for you?

-- Jack Krupansky

-----Original Message----- From: Utkarsh Sengar
Sent: Thursday, October 10, 2013 8:48 PM
To: solr-user@lucene.apache.org
Subject: Re: Using split in updateCSV for SolrCloud 4.4

@Jack I just noticed in your example that: feat1:feat2 is not in an
encapsulator ".
Was that a typo or intentional?

You are passing f.features.encapsulator=%22 but don't have " around
feat1:feat2. The request should look:

curl "
http://localhost:8983/solr/update/csv?commit=true&f.features.split=true&f.features.separator=%3A&f.features.encapsulator=%22";
-H "Content-Type: text/csv" -d '
id,name,features
doc-1,doc1,"feat1:feat2"'


Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 5:10 PM, Utkarsh Sengar <utkarsh2...@gmail.com>wrote:

Didn't help.

This is the complete data: https://gist.github.com/utkarsh2012/6927649(see merchantList column).
I tried this URL:
curl '
http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=\&stream.contentType=text/csv&stream.file=/data/dump/log_20130101<http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=%22&escape=%5C&stream.contentType=text/csv&stream.file=/data/dump/log_20130101>
'

Can this be a bug in the UpdateCSV split function?

Thanks,
-Utkarsh



On Thu, Oct 10, 2013 at 3:11 PM, Jack Krupansky <j...@basetechnology.com>wrote:

Using the standard Solr example for Solr 4.5, the following works,
splitting the features CSV field into multiple values:

curl "http://localhost:8983/solr/**update/csv?commit=true&f.**
features.split=true&f.**features.separator=%3A&f.**
features.encapsulator=%22<http://localhost:8983/solr/update/csv?commit=true&f.features.split=true&f.features.separator=%3A&f.features.encapsulator=%22>"
-H "Content-Type: text/csv" -d '
id,name,features
doc-1,doc1,feat1:feat2'

You may need to add &stream.contentType=text/csv to you command.

-- Jack Krupansky

-----Original Message----- From: Utkarsh Sengar
Sent: Thursday, October 10, 2013 4:51 PM
To: solr-user@lucene.apache.org
Subject: Using split in updateCSV for SolrCloud 4.4


Hello,

I am trying to use split: http://wiki.apache.org/solr/**UpdateCSV#split<http://wiki.apache.org/solr/UpdateCSV#split>while
loading some csv data via updateCSV.

This is the field:
<field name="merchantList"  type="string" indexed="true"  stored="true"
multiValued="true" omitNorms="true" termVectors="false"
termPositions="false" termOffsets="false"/>

This is the column in CSV (merchantList):
....values....,"16179:10950",.**....values..


This is the URL I call:
http://localhost/solr/coll1/**update/csv?commit=true&f.**
merchantList.split=true&f.**merchantList.separator=%3A&f.**
merchantList.encapsulator=<http://localhost/solr/coll1/update/csv?commit=true&f.merchantList.split=true&f.merchantList.separator=%3A&f.merchantList.encapsulator=>
"&escape=\&stream.file=/data/**dump/log_20130101'

Currently when I load the data, I see this:
       "merchantList": ["16179:10950"],
But I want this:
       "merchantList": ["16179","10950"],


This example is int but I have intentionally kept it as a string since
some
values can also be a string.

Any suggestions where I am going wrong?

--
Thanks,
-Utkarsh




--
Thanks,
-Utkarsh




--
Thanks,
-Utkarsh

Reply via email to