Saturday, 15 January 2011

exchangewebservices - EWS SearchFolder does not return values from body -


I am trying to create a searchfolder using the EWS API (managed or web service directly). I have noticed that if I create ItemSchema.Body on SearchFilter.ContainsSubstring , then I do not get any conversations about it.

Here's how I create my folder:

  var folder = new search folder (service) {DisplayName = topic}; Var search parameter = folder Search parameters; SearchParameters.SearchFilter = New SearchFilter.ContainsSubstring (ItemSchema.Body, Subject, ContainmentMode.Substring, ComparisonMode.IgnoreCaseAndNonSpacingCharacters); SearchParameters.RootFolderIds.Add (WellKnownFolderName.Root); Search Parameters Traveler = Searchfolder Travelers Dip; Folder.Save (WellKnownFolderName.SearchFolders);  

Later, I try to get the conversation from this folder:

  service.FindConversation (conversation view, folder.id);  

And it gives 0 conversations.
I made sure to send two messages to my email account, with only one special word in the first subject, and the other with the same word in the body. If I make a searchfolder with a filter on ItemSchema.Subject , I get the first conversation, but using the above searchfolder I did not get the expected result.

Is there some restrictions in relation to Substring Search Filter? I tried to use generalized body or textboard, but then I found errors in the folder creation process, is there anything else I'm missing?

Search filtering on the body might be problematic, it goes back that potentially large in content tables How the properties like body are handled, a query string search might work, but you can not use the query string to create a search folder.


No comments:

Post a Comment