« Keep your UCM instance in shape | Main | Clone Your Content in UCM »

Expanding on the Sort Fields in UCM

By default, the sort fields available in UCM are Release Date and Title. And if you are using Oracle 11g Database and the OracleTextSearch component, you also get to sort on the Score (relevancy). But often, it's helpful to be able to sort on additional fields such as Type, Author, or other custom fields.

In order to add additional fields, it takes a simple component that merges a couple of tables into the standard search definitions tables. Those two additional tables are SearchEngineRules and SearchFieldInfo.

In the custom SearchEngineRules table, you want to add the additional fields to the pipe delimited list of sort fields.

sort_searchenginerules.jpg

In the custom SearchFieldInfo table, you want to define each of those extra sort fields. You want to define the name, type, if it's sortable (true), and its localized string value for the interface (SearchFieldWWString). The other values are optional.

sort_searchfieldinfo.jpg

For a sample of this component, you can download one here. If you are using standard database metadata or fulltext searching, you simply need to enable the component and it should begin working. If you are using OracleTextSearch with the Oracle 11g database, then there is an extra step. You'll need to log into UCM and go to Administration -> Text Search Admin. Select each field to be sorted on in the Non Optimized Fields list and move them to Optimized Fields. After updating, you'll need to perform a Fast Rebuild which can be done lower on that page.

Once added, go to the search page and you'll notice that you now have an extended list of fields to choose from.

SortByViews.jpg

And on top of that, if you are using the Headline View for search results and add those fields to your view, you can sort the results by clicking on the column header.

SearchResultsSortViewsStandard.jpg

PRO TIP

One of the nice features of Content Tracker is the ability to take content access data and insert that into metadata.

tracker_snapshots.jpg

With that information, you can perform searches based on dates the content has been viewed and for how many times. But combine that information with the ability to sort on those fields, and you now have popularity based searching!

SearchResultsSortViews.jpg

TrackBack

TrackBack URL for this entry:
http://blogs.oracle.com/mt/mt-tb.cgi/15147

Comments (1)

Donna:

Kyle: This is VERY helpful information. Thanks! Although it's not something I immediately need, I'll bet that it comes up in a few weeks.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)