Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

BCS Connector and MimeTypeField

$
0
0

Hi!

I'm writing a custom BCS connector to crawl my data source. I've implemented Finder, SpecificFinder and StreamAccessor methods. I can't figure out how to use MimeTypeField to tell Sharepoint which IFilter to use.

  • According to this page, http://msdn.microsoft.com/en-us/library/ff634782.aspx, MimeTypeField should have the name of the field that contains the MIME type of the Stream. Does this field have to be in SpecificFinder's results only or both in Finder and SpecificFinder?
  • According to the same page, the field that MimeTypeField property points to, should contain "the MIME type from the external system". I can only assume it would be something like "application/msword" for MSWord doc files. However, this page,http://msdn.microsoft.com/en-us/library/ff394525.aspx, indicates that MimeTypeField should contain the extension without the leading "." As the description reads, "For example, the MIME type for the resume for candidate1 is “docx” and “pdf” for candidate2."
  • Lastly, this page, http://msdn.microsoft.com/en-us/library/gg294168.aspx, mentions two new properties set on MethodInstance, Extension and ContentType, that are nowhere else documented, as well as MimeTypeField. In this example, MimeTypeField contains the actual MIME type, not the extension. The ContentType property also points to the field containing the MIME type, whereas Extension property points to a field that contains the extension, with the leading "."

I initially implemented MimeTypeField property to point to a field that contains a MIME type, like "application/pdf" and similar. However, all my documents were being crawled as .txt files. I added the same documents to a sharepoint doc library and they were successfully crawled with proper IFilters, so it's not a problem of missing IFilters.

What property should I use so Sharepoint can pick the right IFilter to read the stream from my StreamAccessor? Should this property point to a field that contains the actual MIME type, or an extension (with or without leading period).

Is there anything I can look for in the logs so I can understand why Sharepoint isn't picking the right IFilter?

 

Thanks!



Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>