1. A network device, comprising: a transceiver to send and receive data over a network; and a processor that is operative on the received data to perform actions, including: receiving a message having at least one attachment; using a machine learning model to select at least one sentence from within the message to be relevant to the at least one attachment based on a set of predefined sentence level features; identifying from within the relevant sentence at least one keyword determined to be further relevant to the at least one attachment; and associating the at least one keyword to the at least one attachment, such that the association is useable for at least one of indexing or searching of the at least one attachment.