Case Insensitive Search Is Not Working Using Asset Api (Doc ID 1583328.1)

Last updated on JANUARY 03, 2016

Applies to:

Oracle WebCenter Sites - Version 7.6.1 and later
Information in this document applies to any platform.

Symptoms

Asset api case insensitive search is not working.  Here is example code searching FirstSiteII site data:

<%@ page import="com.fatwire.system.*"%>
<%@ page import="com.fatwire.assetapi.data.*"%>
<%@ page import="com.fatwire.assetapi.query.*"%>
<%@ page import="java.util.*"%>
<%
Session ses = SessionFactory.getSession();
AssetDataManager mgr = (AssetDataManager) ses.getManager(AssetDataManager.class.getName());
Condition queryCondition = ConditionFactory.createCondition( "FSIIHeadline", OpTypeEnum.LIKE,"%firstsiteii%");
Query query = new SimpleQuery("Content_C", "FSII Article", queryCondition, null);
query.getProperties().setIsCaseSensitive(false);
query.getProperties().setIsBasicSearch(false);
for( AssetData data : mgr.read( query )) {
 out.println(""+ data.getAssetId().getId() +"</br>");
}
%>

Case sensitivity should have been disabled with setIsCaseSensitive(false).  The above code should return this asset but does not and returns nothing instead:

Content_C:1124813172330 asset has the FSIIHeadline attribute with the value "About FirstSiteII"


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms