Loading .csv file in solr with separator as special-character

Viewed 89

Enviornment - java version "11.0.12" 2021-07-20 LTS , solr-8.9.0

I am loading a csv file having separator Ǎ (decimal value- 461) in solr. For loading i have used following 2 ways.

1. curl "http://localhost:8983/solr/start13/update?commit=true&separator=Ǎ" --data-binary @/solr/python/special_character.csv -H 'Content-type:application/csv'
2. curl "http://localhost:8983/solr/start13/update?commit=true&separator=\Ǎ" --data-binary @/solr/python/special_character.csv -H 'Content-type:application/csv'

Both of the above command are leading to error as follows

<h3>Caused by:</h3><pre>org.apache.solr.common.SolrException: URLDecoder: The query string contains a not-%-escaped byte &gt; 127 at position 23
at org.apache.solr.servlet.SolrRequestParsers$2.read(SolrRequestParsers.java:307)
at org.apache.solr.servlet.SolrRequestParsers.parseFormDataContent(SolrRequestParsers.java:339)
at org.apache.solr.servlet.SolrRequestParsers.parseQueryString(SolrRequestParsers.java:316)
at org.apache.solr.servlet.SolrRequestParsers.parseQueryString(SolrRequestParsers.java:286)
at org.apache.solr.servlet.HttpSolrCall.&lt;init&gt;(HttpSolrCall.java:194)
at org.apache.solr.servlet.SolrDispatchFilter.getHttpSolrCall(SolrDispatchFilter.java:485)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:424)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:357)

curl loading command is running successfully for .csv file having separator as '|' . How to load csv file having special-character as a separator.

0 Answers
Related