cancel
Showing results for 
Search instead for 
Did you mean: 

How to customize detailed views in Alfresco search results ?

cesarista
World-Class Innovator
World-Class Innovator

Hi:

I need to add custom metadata properties, and to change the time function in "Modified ... by ... " in Alfresco faceted search results.

Is there any simple way of modifying custom detailed views in Alfresco faceted search results ? Is it similar to define metadata templates for the document library ? I am using Alfresco 5.1.e (201602GA).

Best regards and thanks in advance.

--C.

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

It is not at all the same as defining a custom metadata-template for the documentlibrary. Faceted search is using AIkau and a minimalized set of properties returned as part of the search results (to improve performance). This means you need to use a different approach to customization (Surf extension modules and / or custom Aikau widgets) and can typically work with fewer of the properties of a result.

There are a couple of blog posts out there detailing faceted search customizations, though some details may have changed since Aikau and faceted search have been actively improved upon in the last releases. Dave Draper once wrote about adding views to filtered search and Contezza about customizing the search result list. I'd say each is still 80% or more applicable to 5.1.e but there may be some (subtle) differences.

View answer in original post

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator

It is not at all the same as defining a custom metadata-template for the documentlibrary. Faceted search is using AIkau and a minimalized set of properties returned as part of the search results (to improve performance). This means you need to use a different approach to customization (Surf extension modules and / or custom Aikau widgets) and can typically work with fewer of the properties of a result.

There are a couple of blog posts out there detailing faceted search customizations, though some details may have changed since Aikau and faceted search have been actively improved upon in the last releases. Dave Draper once wrote about adding views to filtered search and Contezza about customizing the search result list. I'd say each is still 80% or more applicable to 5.1.e but there may be some (subtle) differences.

cesarista
World-Class Innovator
World-Class Innovator

Thanks for the references and the orientation, Axel.

I'll check the blog posts.

Regards.

--C.

ddraper
World-Class Innovator
World-Class Innovator

The main thing to be aware of is the limited amount of data that is returned by the REST API. This means that there is only a very small amount of metadata for each node that can be displayed (and in fact it's all being displayed in the standard AlfSearchResult widget). From 5.2 onwards the REST APIs have been updated to include all the metadata (as you'd find on the Document Library) which will give you a lot more options in terms of customizing. You can of course customize (override in this case) the 5.1 APIs to have the same effect - see this question on StackOverflow.

The AlfSearchResult provides a number of configuration options for changing its appearance, but for more advanced customizations you're going to want to create a new AlfListView for the results. You should also be aware of the search "aware" mix-in modules (such as _SearchResultLinkMixin) that you may want to mix-in to custom widgets if you write any.

cesarista
World-Class Innovator
World-Class Innovator

Thanks for the details, Dave.

Regards.

--C.