[ https://issues.apache.org/jira/browse/TIKA-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13500330#comment-13500330 ]
Jukka Zitting commented on TIKA-1027: ------------------------------------- Hmm, good point. I'd argue that the simplicity and safety of not having to worry about null values outweighs the benefits of using nulls in the Embedder, but then I'm not using Embedder yet so I don't have a balanced view on the issue. A somewhat hacky alternative to using null values to signify removals would be to pass a set of field names to remove, either as a separate argument or as a custom multi-valued metadata field. > Allow null values when setting metadata > --------------------------------------- > > Key: TIKA-1027 > URL: https://issues.apache.org/jira/browse/TIKA-1027 > Project: Tika > Issue Type: Improvement > Components: metadata > Reporter: Jukka Zitting > Assignee: Jukka Zitting > Priority: Minor > Fix For: 1.3 > > > Many file formats have optional metadata entries that result in a lot of {{if > (value == null)}} statements around {{metadata.set(...)}} calls. It would be > more convenient if the {{set}} method explicitly allowed a {{null}} value and > that a call like {{metadata.set(name, null)}} was essentially equivalent to a > {{metadata.remove(name)}} call. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira