[
https://issues.apache.org/jira/browse/SOLR-13304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835606#comment-16835606
]
Gus Heck commented on SOLR-13304:
---------------------------------
Looks like I forgot to come back to this. When I went to commit it I noticed
that it breaks a test for PreAnalyzeFieldUpdateRequestProcessor which was
relying on it's exception swallowing properties. I moved the exception ignoring
behavior into the URP. In addition to covering exceptions and converting them
to log messages (by design), that URP has some other slightly odd behaviors,
which may deserve adjustment, but URP related stuff can be discussed in another
ticket. Attaching patch with adjustments to the URP. The only user visible
change there is now you will get a slightly different log message for a null
field value vs an exception parsing the pre-analyzed data.
> PreanalyzedField#createField swallows Exception
> -----------------------------------------------
>
> Key: SOLR-13304
> URL: https://issues.apache.org/jira/browse/SOLR-13304
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 7.7.1, 8.0
> Reporter: Gus Heck
> Assignee: Gus Heck
> Priority: Major
> Attachments: SOLR-13304.patch, SOLR-13304.patch
>
>
> The following code allows one to believe that an ill formatted pre-analyzed
> field has successfully been written unless one is actively monitoring the
> logs:
> {code}@Override
> public IndexableField createField(SchemaField field, Object value) {
> IndexableField f = null;
> try {
> f = fromString(field, String.valueOf(value));
> } catch (Exception e) {
> log.warn("Error parsing pre-analyzed field '" + field.getName() + "'", e);
> return null;
> }
> return f;
> }{code}
> I believe this should throw an error just like a poorly formatted date or
> other invalid value.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]