0

I need to show file type in refinement panel with types such as wmv, avi, mp4, mpeg so that users can refine based on these types.

I tried adding the above file types in CentralAdmin -> Search Service -> File Types

After that I did a full crawl.

But still it is not showing in the file type refiner.

What am I missing?

1

Actually the custom file type extensions which we add to the central admin will be available in the file types when we preview the refinement panel.

But the filetypes what we see is different, we see user friendly names for that.

Say for xlsx we see Excel and for ppt we see PowerPoint and so on.

So i checked the display template for the refinement panel.

In the filter_default.html, i Found a function for mapping the extensions.

    function mapResultType(listData)
        {
            var map = { };
            map[Srch.U.loadResource("rf_ResultTypeRefinerValue_MSAccess")] = {
                "RefinerName": "FileType",
                "RefinementValues": ["accdb", "accdc", "accde", "accdr", "accdt"]
            };
            map[Srch.U.loadResource("rf_ResultTypeRefinerValue_AdobePDF")] = {
                "RefinerName": "FileType",
                "RefinementValues": ["pdf"]
            }; 
    .....
    .....
            map[Srch.U.loadResource("rf_ResultTypeRefinerValue_MSExcel")] = {
                "RefinerName": "FileType",
                "RefinementValues":        ["odc", "ods", "xls", "xlsb", "xlsm", "xlsx", "xltm", "xltx", "xlam"]
            }; 
            map[Srch.U.loadResource("rf_ResultTypeRefinerValue_Image")] = {
                "RefinerName": "FileType",
                "RefinementValues": ["bmp", "jpeg", "png", "tiff", "gif", "rle", "wmf", "dib", "ico", "wpd", "odg"]
            };
    .....
    .....
}

Towards the last i added a mapping for Video also as below:

map["Video File"] = {
    "RefinerName": "FileType",
    "RefinementValues": ["wmv","avi","mp4","mpeg"]
};

And now i am able to see the video file type in refinement panel when i have videos in the serach result.

0

You need to create a managed property for this. Simply allowing the file types in CA will not add them to refiner panel. If the files are coming from a library, create a calculated column and populate the extension there for each item. Run a full crawl and crawled property with ows_"ColumnName" will be created.

Then create a managed property and map it with the above crawled property. Check the refiner property check box. Run a Full Crawl.

Edit the refiner panel and then you will be able to choose the refiner there.

  • So you say it is not possible to add file types to the built in file type refiner? – Robert Lindgren May 28 '14 at 6:18
  • @Suraj wants to add it in Refinement Panel. So the file extensions should be indexed hence we need to have a dedicated managed property which holds its values so that it could be refined. – Varun Verma May 28 '14 at 6:20
  • 1
    It is already indexed, and there is already a refiner for it: eliostruyf.com/… – Robert Lindgren May 28 '14 at 6:20
  • @RobertLindgren thanks, didn't knew about it. – Varun Verma May 28 '14 at 6:24
  • @varun-verma there are default properties like file type and file extension managed property in CA, so why we need to add a new column and have a corresponding managed property. already we are using File Type refiner, adding one more refiner is awkward. – Suraj May 28 '14 at 7:10
-1

Just add

map[Srch.U.loadResource("rf_ResultTypeRefinerValue_Video")] = {
    "RefinerName": "FileType",
    "RefinementValues": ["wmv","avi","mp4","mpeg"]
};

and it works for SP Online

  • I used Google Translate to translate the answer. If I got it wrong, please fix or revert. – wjervis Jun 19 '18 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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