Gus Heck created SOLR-13304:
-------------------------------

             Summary: PreanalyzedField#createField swallows Exception
                 Key: SOLR-13304
                 URL: https://issues.apache.org/jira/browse/SOLR-13304
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 7.7.1, 8.0
            Reporter: Gus Heck
            Assignee: Gus Heck


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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to