Reputation: 210
The CSV writing parameter for Solr csv.mv.escape
defaults to \
. I don't want the multi-valued fields to be escaped but can't find a way of doing it.
http://localhost:8983/solr/default/select?
q=*:*
&wt=csv
&csv.header=true
&csv.mv.escape=\
To remove the default escaping I'm wanting to be able to do something like this
http://localhost:8983/solr/default/select?
q=*:*
&wt=csv
&csv.header=true
&csv.mv.escape=none
How can this be achieved?
Upvotes: 0
Views: 109
Reputation: 52892
As far as I can see in the source, the escape value is set when the CSVStrategy is created, and then only set to a different value if a different value is provided. So I don't think there's a way to make Solr skip the escape.
CSVStrategy mvStrategy = new CSVStrategy(strategy.getDelimiter(), CSVStrategy.ENCAPSULATOR_DISABLED,
CSVStrategy.COMMENTS_DISABLED, '\\', false, false, false, false, "\n");
My only, bad, hackish suggestion is, if this only for one time task, to use a value that doesn't occur in the text as the escape value, then replace that value after retrieving the CSV structure.
Upvotes: 1