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.


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.


For a sample of this component, you can download one

. 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.


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.



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


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!



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.

Posted by Donna on November 11, 2009 at 07:32 AM CST #

Thanks for this. I'm having difficulty getting it to work with my custom 'description' metadata field of type 'memo'. My custom field isn't shown in the list of non-optimized or optimized fields on the text search admin screen : / Maybe memo type fields cannot be optimized?

Posted by Jj on February 23, 2010 at 08:00 AM CST #

I hadn't really noticed that before, but that looks to be the case. I'm not seeing memo fields in my environment either when using Oracle Text Search. It does appear to support memo fields when using database or database full-text searching.

Posted by kyle.hatlestad on February 26, 2010 at 12:28 AM CST #

Very, Very nice!! And well worte! Still i have a little question the "SearchFieldWWString" where can i find it?(or i cand write there any value?) I need because i want to sort some custom field, it is possible? many, many thanks!!

Posted by a. on December 22, 2010 at 11:28 PM CST #

Is this an option in UCM11gR? Or is this UCM10gR3 in combination with 11g database? If so, do you now there is an option like this in UCM 11g?

Posted by guest on August 19, 2011 at 12:00 AM CDT #

Yes, you can do the same thing in UCM 11g with an 11g Oracle Database.


Posted by Kyle Hatlestad on August 26, 2011 at 06:27 AM CDT #

I have a doubt,it isn't on the post, but maybe somebody knows.

I have a personal field that have an option list. That field it's my sortField, but I need to order by it's visible column not the intern column
It's posible? I cannot see how.

Thak you in advance

Posted by Reb on November 22, 2011 at 12:32 AM CST #

Hey Reb,

I'm afraid the search engine only knows the values defined in the internal column, so it can only sort by those values. The visible column value is only used for display.


Posted by Kyle Hatlestad on November 28, 2011 at 03:11 AM CST #

I am using UCM 11g with ORACLETEXTSEARCH with an Oracle 11.2 db, but I don't have the "Administration - Text Search Admin" menu option. I added your component and restarted UCM. I do not see any additional options for sorting. Do you know why I don't see the Text Search Admin?

Posted by Bryan on December 19, 2011 at 07:16 AM CST #

Found it.. under Config Manager - Advanced Search Design.

Posted by Bryan on December 19, 2011 at 07:41 AM CST #

I found the text admin under Configuration Manager, Advanced Search Design. However, even after changing my xDocCreateDate to sortable, modifying the component, my search sort list still just has the 3 stock fields. Title, date, score.

Posted by Bryan on December 19, 2011 at 07:49 AM CST #

Thanx for this great post.

But i have now only one problem.

How can i sort by a custom date type field?

Is it possible?

Posted by ASM on February 29, 2012 at 03:08 PM CST #

Hello ASM,

You can define a date field for sorting, but there is a bug in certain versions of UCM 11g which will cause errors from the search cache when sorting on a date field. If there are documents in the search result that don't have any value in the date field, that will trigger the error in sorting. The best way around this is to ensure a value in that field for every content item.


Posted by Kyle Hatlestad on March 03, 2012 at 03:32 PM CST #

Will this configuration apply to the search result of Library Folder also ?

Posted by guest on April 29, 2012 at 01:26 PM CDT #

installed this component but the sort list still just has the 3 stock fields.
We added “IsSortable” and “IsOptimized” options to a custom metadata field from the Advanced Search Design and did rebuild the index collection. However now we are getting an alert “Index Collection needs to be synchronized, a full collection rebuild is required. Please rebuild the index collection.”.
did I miss something?

Thank you in advance!


Posted by yeon on November 26, 2012 at 05:23 PM CST #

Hello Yeon,

You didn't specify what version of UCM/WCC you are on, so I'll assume it's 11g using OracleTextSearch. For the fields that are defined in the component to be added to the list, you'll have to do what you did for your custom metadata field and add 'Is Sortable' and 'Is Optimized' for them. They component includes dDocName, dDocTitle, dDocAuthor, dInDate, dSecurityGroup, and dDocType as fields you can possibly sort on.

If you want to add your own custom metadata field, you'll also need to modify the component to add that field to the SearchEngineRules and SearchFieldInfo as described above.

And after you've done all of that, you will need to perform a rebuild of the collection. But it only needs to be a 'Fast Rebuild' so that the documents do not all need to be re-indexed.


Posted by Kyle Hatlestad on November 27, 2012 at 11:26 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/


« July 2016