How can I insert more than 3400 bytes of text into a field in Tridion brokers?

I have a schema with a lot of metadata fields. We want to be able to search for components based on this scheme from a broker through the Tridion API, for example:

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 great: the user can enter the search text, we pass the search text through Tridion through the broker's API, and Tridion returns us the components corresponding to this search text.

But! If I add a lot of text to the content field for any component, the Tridion publishing process will fail at the β€œdeploy” stage:

Phase: the deployment processing phase failed, the component [Component id = tcm: 9-2617-16 title = xyz schema = tcm: 9-2325-8], CustomMeta field, StringValue, was larger than the supported size of 3400 bytes!

I tried changing the KEY_STRING_VALUE column in the broker database of the CUSTOM_META table from nvarchar (3400) to nvarchar (MAX), but this did not seem to fix the problem.

I do not exceed the limit for many things: "wc" tells me that there are 4037 bytes in my text. About 6,000 or so sounds like a comfortable upper limit for my needs.

Is there an easy way to increase the number of bytes of text allowed in this field?

+7
source share
2 answers

There is no supported way to do what you want to accomplish. Also, keep in mind what the actual purpose of the custom meta is. It seems that you are using it incorrectly, adding a huge amount to the column.

In any case, if you really want to go down this road, you need to contact Tridion support or visit sdltridionworld (login required) and download CD_2011.1.1.83467 (or any fix containing CD_2011.1.1.81125, except CD_2011. 1.1.83475 !!!). The patch changes eliminate the rigorous verification of the size of metadata performed during deployment. In other words, it allows you to shoot in the foot, allowing the database server to decide if you are allowed to store so much content in this column. Keep in mind that changing database columns is not supported by Tridion.

Hope this helps.

+10
source

Changing the definition of a column in the broker's database does not and may lead to support and update problems for your future implementation.

It looks like you are taking the text content of your components and putting it in the metadata text box to provide some kind of full-text search on your front (I ask if I am mistaken). This does not necessarily correspond to the intended purpose of the content delivery API.

I refer you to the previous question on the implementation of free text search and my answer

+5
source

All Articles