On 2/26/2018 5:05 AM, Gabi wrote:
> 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?

The parameters in a SolrJ request object do not get changed as far as
case.  So the change is happening on the server side.

This issue might be the cause of your error:

https://issues.apache.org/jira/browse/SOLR-5375

That issue made the "lowernames" parameter affect literals as well as
fields generated by the Tika extraction itself.  It took effect in
version 4.9.

In the example definition for the ExtractingRequestHandler that you
probably copied, the lowernames parameter is set to true.

You could solve this particular error by setting lowernames to false in
solrconfig.xml, but that would probably cause other problems with field
names.  Either way, you're going to have to change some of your field
names to match the case that you're actually ending up with.  This will
require that you reindex, and is likely to also require changes in your
application.  But when you upgrade three major versions, it's always
best to reindex anyway.

Thanks,
Shawn

Reply via email to