We're trying to upgrade from and old standalone 4.6.0 installation to a 7.2.1 new one.
After some work (of course it's not as easy as install and change schema.xml and data-config.xml file) it seems to be working with the database but not with documents. Database information is loaded initially from a full import from admin web interface, with a full-import and seems to be ok. Documents where imported with an application that basically does this (sample code): public int indexFile(String fileName, File file, long idDoc, String province, String province Code) { HttpSolrClient solr = new HttpSolrClient.Builder(urlString).build(); ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); boolean continue = false; int result = 0; try { if(fileName.toLowerCase().endsWith(".pdf")) { up.addFile(file, "application/pdf"); continue = true; } else if (fileName.toLowerCase().endsWith(".docx") || fileName.toLowerCase().endsWith(".doc")) { up.addFile(file, "application/octet-stream"); continue = true; } else { System.err.println("Not supported type!!!"); result = -2; } if (continue) { String aux = Long.toString(idDoc); up.setParam("literal.id", "DOC_"+aux); up.setParam("literal.idDoc", Long.toString(idDoc)); if ( provincia != null) up.setParam("literal.provinceUser", province); if ( provinciaCode != null) up.setParam("literal.provinceCodeUser", provinceCode); up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true); solr.request(up); } } catch (SolrServerException solr_e) { solr_e.printStackTrace(); result = -1; } catch (IOException io_e) { io_e.printStackTrace(); result = -1; } return result; } This worked ok on 4.6.0, in the new server we get an exception: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://127.0.0.1:8983/solr/collection1: ERROR: [doc=...] unknown field provincecodeuser or same error with unknown field 'iddoc' Error is because it's seraching fot the field with all lower case letters but in schema.xml and in the code it has some capital letters!!! up.setParam("literal.idDoc", Long.toString(idDoc)); or up.setParam("literal.provinceCodeUser", provinceCode); Why is changing the setParam the param String value to lowercase letters? this did not happen with 4.6.0 version same application but with 4.6.0 SolrJ libraries. How can we use Strings with capital letters? Or is not possible and we have to change all the aprameter names in the schema.xml and data-config.xml files? Regards. --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus