2
votes

How can i escape special character in field name??

http://localhost:8983/solr/col/select?boost=if(exists(img-image_string),5,1)&debugQuery=on

gives me error error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"undefined field: \"img\"",
    "code":400}}
1
You should not use character other than alphanumeric and underscore - Ashraful Islam

1 Answers

1
votes

Solr / Lucene uses \ as its escape character, but you should really try to avoid using characters with special meaning in field names.