AttachmentsFor method returns information about each attachment that extends
a specified document, including their names, sizes, and content type. write index definition as string.
IEnumerable<AttachmentName> AttachmentsFor(object doc);
private String name;
private String hash;
private String contentType;
private long size;
AttachmentsFor method is available in
LoadAttachment() loads an attachment to the index by document and attachment name.
LoadAttachments() loads all the attachments of a given document.
public IAttachmentObject LoadAttachment(object doc, string name);
public IEnumerable<IAttachmentObject> LoadAttachments(object doc);
||A server-side document, an entity
||The document whose attachments you want to load
|The name of the attachment you want to load
To access the attachment content itself, use
convert the content into a
the desired character encoding.
public Stream GetContentAsStream();
public string GetContentAsString(Encoding encoding);
public string GetContentAsString(); // Default: UTF-8
Applications for Attachment Content: Machine Learning
Access to the attachment content opens the door to many different
applications, including many that can be integrated directly into
In this blog post,
Oren Eini demonstrates how machine learning image recognition can be
added to an index using the additional sources
feature. The resulting index allows filtering and querying based on