Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Search Problem

  Asked By: Brennan    Date: Jan 31    Category: Sharepoint    Views: 7326

We upload all our documents in one site and map them to portal areas. When we upload a document and enter taxonomies manually, we can search the document.

But when we upload the document and upload the taxonomies by an Event Sink( program code for uploading document with metadata & approval), this uploads the document but we are not able to search the document.

However by removing the update taxonomy fields functionality (shown bold in the code snippet - this uploads Metadata to the File) in the Event sink or removing the Event Sink from the document library we are able to successfully search for the document.

The code snippet of the EventSink is given below:

Code Snippet:

public void OnEvent(Microsoft.SharePoint.SPListEvent evt)
if(evt.Type == SPListEventType.Insert)
SPWeb mySite = evt.Site.OpenWeb();
file = mySite.GetFile(evt.UrlAfter);
file.Item["Last Modified By"] = evt.UserLoginName;
catch(Exception e)
LogInfo("My Update " + e.Message);



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Search Problem Or get search suggestion and latest updates.