foreach (var item in getAllDocuments)
{
index.Events.FileIndexing += (sender, args) =>
{
if (args.DocumentFullPath.EndsWith(item.Location))
{
args.AdditionalFields = new DocumentField[] // Setting additional fields for the current document
{
new DocumentField(“ProjectName”, item.ProjectName),
new DocumentField(“DataRoomName”, item.DataRoomName),
new DocumentField(“FolderName”, item.FolderName),
new DocumentField(“UserName”, model.DisplayUserName)
};
}
};
}
while creating an index i’m adding the additional fields.those additional fields should not come as search result.how to restrict that.