0

I've installed the file connector sample from MS (link).

Everything seems ok and the search is working well. But I can't get the FileType refiner working.

What I've done yet:

Changed the mime type recognition in MyFile.cs from hardcoded values (text and unknown) to System.Web.MimeMapping.GetMimeMapping(fi.Name);

  1. try:

    • No other changes

    Result: FileType is always txt

  2. try:

    • Changed PropsetId in MyFileNamingContainer.cs to "Business Data"-Category PropsetId (without that, no crawled properties are created, because hardcoded PropsetId is unknown in my system)
    • FullCrawl
    • Mapped "Return.Extension" crawled property to "FileType" managed property

Result: FileType is "txt docx" for a docx-File

  1. try (now a little bit desperate):
    • Added "MimeTypeField" and "MimeType" to StreamAccessor method instance (Because nowhere in SharePoint code these properties are used, I wasn't hopeful that this will work.)
    • FullCrawl

Result: Nothing changed. FileType "txt"

Has somebody an advise for me how to find whats going wrong?

Thanks in advance.

1 Answer 1

0

I've found a solution/workaround to get the refiner working:

The only thing I have to do is to change the settings of the "FileType" managed property to respect priority and move my own crawled property to the first position.

With this configuration the file type of the crawled property "Return.Extension" is used and not value of the "FileType" crawled property.

What I can't get working, is to set the "FileType" crawled property to the correct value.

Best regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.