cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter by extensions in the advanced search

Former Member
0 Kudos

Hi SAP gurus

I would like to enable end users to filter their search results by extensions so that the search result only would

include .doc, .xls, .mpp, .htm/html, .pdf and/or .ppt-documents.

How do you enable this functionality in the Advanced Search window?

If I select cm_extension in the SearchOptionsSet, I dont get any option in the "Predefined Property"-field in the Advanced Search window.

Any help is greatly appreciated and will be rewarded.

Best regards,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Martin,

In your advanced search iview, you can setup layout set for search result.

You can duplicate standard search layout and then edit collection renderer and filter by extension.

Layout Set: SearchResultLayoutSet

Collection Renderer: StandardSearchResultRenderer

in the property:

Extension to be Filtered, you must do your modification.

Patricio.

Message was edited by: Patricio Garcia

Former Member
0 Kudos

Hi Patricio

Thank you for your answer.

If I follow your instructions, I can manage to display cm_extensions for the end user in the advanced search window. So far so good.

But in the input field next to the "Extensions"-label, there is no dropdown menu, only an empty field. I though the extensions entered in "Extensions to be Filtered" would be listed here? And if I try to put in "doc" in the Extension box and perform a search, the search results do not make any sense, suggesting that the filter by extension functionality is not working.

What I am interested in is a dropdown menu in the input field next to the "Extensions"-label that will only allow the end user to filter by a predefined set af file types.

Kind regards,

Martin

Former Member
0 Kudos

Martin,

Have your read these blog ?, perhaps can help you.

EP KM FLEX UI: Filtering your resources

How to create namespace filter for km

Patricio.

Message was edited by: Patricio Garcia

Former Member
0 Kudos

Hi Patricio

I might not have made my scenario clear enough. In the advanced search page, the users should be able to filter their search results using a dropdown menu that only includes the files doc, xls, ppt, pdf, mpp and html. I need to know how this dropdown menu can be created from the predefined properties listed in the Search Options Set.

I dont have any need to implement either a namespace or resource filter, because the crawler the TREX is using for retrieving the files is already filtering by my predefined extensions. I have used the result filter with my specific Item ID Patterns from the following documention: http://help.sap.com/saphelp_nw04/helpdata/en/c0/6f5040b48a6913e10000000a1550b0/frameset.htm.

Kind regards,

Martin

D021954
Advisor
Advisor
0 Kudos

Hi Martin,

sorry, in the standard it's not possible to offer such a dropdown list. But you always may enter eg "*.doc" in the

'Name' field of the advanced search.

The property "cm_extension" is never filled. Though it's marked as indexable you will never be able to search for it. In the Predefined Properties in p´rinciple only really indexed properties are offered (Note 872061).

As a Content Management system that is in principle independend of the local operating system (Windows, Unix,...) KM is Mime-Type related and not extension related.

I would recommend you to develop a Search Component (you really should do it once!!) that offers all relevant extensions in the way you like it.

The search query can then be extended like in the mentioned 'Name' query. The SearchQueryListBuilder is easy to use for this purpose and is well documented.

Regards Matthias

Former Member
0 Kudos

Hi Matthias

Ouch, you bring bad news today.

Don't you think that this functionality should be part of the standard delivery? If you agree just the slightest bit with me, then please pass this need for filtering by extensions on to the right developer. I really think you should include it in one of your future releases, since you cannot expect end users to be able to filter by MIME-types - very few know which applications the different MIME-types represent, and it isn't user friendly at all.

I can see that you suggest to perform searches for "*.doc" in the "Name" field of the advanced search page if one wants to see all word-documents. At the moment I have selected the predefined property "cm_displayname" as "Name", and this does not yield the desired search results if I eg. search for *.pdf. A search for *.pdf also includes all files that have pdf in the name of the file. For instance I get a hit on "AFP Print for PDF.html".

What predefined property should I then select instead of cm_displayname?

Martin

D021954
Advisor
Advisor
0 Kudos

Hi Martin,

as I already said, KM is not an application that is 'thinking' in extensions.

Because of this so far no development is planned on this.

But in the mentioned SearchComponent you can define a query, that avoids unintended result objects.

Use property cm_displayname_as_string for this.

Sorry and regards Matthias

Answers (0)