I'm trying to make my SharePoint search service index files through a BCS connector.
I implemented a StreamAccessor in the BDC model and deployed the solution. A full crawl then indicates success. However, searching for terms contained in indexed Office documents (.docx, .pptx) doesn't work, even with simple, small files - search results are empty. Also, if I search on the file name it works, but corresponding search result doesn't include any snippet of the file contents.
Oddly enough, plain text (.txt) files do work. Indexed Office files from a regular Sharepoint content source (document library) also work.
Here's an excerpt from my BDC model :
<Method Name="GetAttachmentStream">
<Parameters>
<Parameter Name="myId" Direction="In">
<TypeDescriptor Name="myIdTypeDescriptor" TypeName="System.Int32" IsCollection="false" IdentifierName="MyId" /></Parameter>
<Parameter Name="stream" Direction="Return">
<TypeDescriptor Name="streamTypeDescriptor" TypeName="System.IO.Stream" /></Parameter>
</Parameters>
<MethodInstances>
<MethodInstance Name="GetAttachmentStreamInstance" Type="StreamAccessor" ReturnParameterName="stream" ReturnTypeDescriptorPath="streamTypeDescriptor">
<Properties>
<Property Name="MimeTypeField" Type="System.String">MimeType</Property>
<Property Name="FileNameField" Type="System.String">FileName</Property>
</Properties>
</MethodInstance>
</MethodInstances></Method>
The MimeType field in my items is populated with for instance : application/vnd.openxmlformats-officedocument.wordprocessingml.document
for a .docx, application/vnd.openxmlformats-officedocument.presentationml.presentation
for a .pptx.
Any help would be much appreciated.
[Edit]
I changed the MIME types to match what appears under OfficeServer\Search\Setup\Filters in the Sharepoint server's registry, namely application/vnd.ms-word.document.12
and application/vnd.ms-powerpoint.12
. It still doesn't work.
Also tried :
<Property Name="Extension" Type="System.String">Extension</Property>
<Property Name="ContentType" Type="System.String">MimeType</Property>
<Property Name="MIMETypeField" Type="System.String">MimeType</Property>
<Property Name="FileNameField" Type="System.String">FileName</Property>
But I get a "dot notation refers to a node that doesn't exist" exception on the very "MimeType" field name that has been generating no crawl exception when used with MIMETypeField
property until now.
I really can't get my head around this.