[
https://issues.apache.org/jira/browse/SOLR-7366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Rowe updated SOLR-7366:
-----------------------------
Attachment: SOLR-7366.patch
Patch against trunk adding {{ResourceLoaderAware}} inform'ing to every place
that does {{SchemaAware}} inform'ing, including in
{{IndexSchema.readSchema()}}. I had to move
{{informResourceLoaderAwareObjectsInChain()}} and
{{informResourceLoaderAwareObjectsForFieldType()}} from {{ManagedIndexSchema}}
to {{IndexSchema}} so that they are accessible from
{{IndexSchema.readSchema()}}.
After I fixed the code, the data triggered a schemaless issue: there is a
document (not the first!) in {{example/exampledocs/ipod_other.xml}} with an
integral value for the {{weight}} field. In standalone mode, this isn't an
issue because docs are processed sequentially, but in cloud mode, some docs can
be indexed on non-coordinator nodes, resulting in out-of-order schema
modifications. I ran into just that, with errors like the following in the
{{solr.log}}:
{noformat}
ERROR - 2015-04-09 00:06:55.371; org.apache.solr.common.SolrException;
org.apache.solr.common.SolrException: ERROR
: [doc=F8V7067-APL-KIT] Error adding field 'weight'='4.0' msg=For input string:
"4.0"
[...]
Caused by: java.lang.NumberFormatException: For input string: "4.0"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:441)
{noformat}
So this patch also modifies {{example/exampledocs/ipod_other.xml}} to convert
the one integral {{weight}} field value into a float.
I tested the patch manually against trunk and lucene_solr_5_1 using the repro
instructions in the description, both succeeded.
> Can't index example XML docs into the cloud example using bin/post due to
> regression in ManagedIndexSchema's handling of ResourceLoaderAware objects
> used by field types
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-7366
> URL: https://issues.apache.org/jira/browse/SOLR-7366
> Project: Solr
> Issue Type: Bug
> Affects Versions: 5.1
> Reporter: Timothy Potter
> Priority: Blocker
> Fix For: 5.1
>
> Attachments: SOLR-7366.patch
>
>
> Managed schema code has regressed SOLR-6764. Need to fix the regression and
> implement a unit test to catch this type of regression. This is a blocker for
> 5.1.
> To reproduce:
> {noformat}
> bin/solr -e cloud -noprompt
> bin/post -c gettingstarted example/exampledocs/*.xml
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]