I have a schema with a lot of metadata fields. We want to be able to search for components based on that schema from the broker via the Tridion API like:
using Tridion.ContentDelivery.DynamicContent.Query;
private static Criteria getSearchCriteria(
string searchText,
params BrokerConstants.MetadataField[] fields)
var searchCriteria = new List<Criteria>();
foreach (var f in fields)
{
var mkcText = new CustomMetaKeyCriteria(f.Name);
var mvcText = new CustomMetaValueCriteria(
mkcText,
"%" + searchText + "%",
Criteria.Like);
searchCriteria.Add(mvcText);
}
return new OrCriteria(searchCriteria.ToArray());
}
This works fine so far: the user can type in some search text, we pass the search text through to Tridion via the broker API, and Tridion gives us back the components that match that search text.
But! If I add a lot of text to the content field for any component, the Tridion publishing process fails at the "deploying" phase:
Phase: Deployment Processing Phase failed, Could not deploy component [Component id=tcm:9-2617-16 title=xyz schema=tcm:9-2325-8], CustomMeta field, StringValue, is bigger than the supported size of 3400 bytes!
I tried changing the KEY_STRING_VALUE column in the broker databases's CUSTOM_META table from nvarchar(3400) to nvarchar(MAX), but that doesn't seem to have fixed the problem.
I'm not exceeding the limit by very much at all: "wc" tells me there are 4037 bytes in my text. Around 6000 or so sounds like a comfortable-ish upper limit for my needs.
Is there an easy way to increase the amount of bytes of text I'm allowed in this field?