Hello everyone,
I am having trouble using the SDL api when trying to retrieve large amounts of search results.
I create a ServerBasedTranslationMemory object, then I get the LanguageDirection I’m interested in , then I finally call the API’s method SearchText to retrieve the results:
SearchResults results = languageDirection.SearchText(new SearchSettings()
{
MinScore = 100,
Mode = SearchMode.ConcordanceSearch,
MaxResults = 50000,
Filters = null
},
« theStringImLookingFor »);
Sometimes, we get 100 results in return and it works fine, sometimes when we’re getting much more, it does not.
I activated the logging in the applicationService.exe.config located in c$\Program Files (x86)\SDL\SDL Server\Application.
Here is the message I get:
2014-10-06 19:34:07.396#Communication.ErrorHandler#There was an error while trying to serialize parameter http://sdl.com/languageplatform/2010:SearchTextResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '1048576'. Change the object graph or increase the MaxItemsInObjectGraph quota. '. Please see InnerException for more details.
System.ServiceModel.CommunicationException: There was an error while trying to serialize parameter http://sdl.com/languageplatform/2010:SearchTextResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '1048576'. Change the object graph or increase the MaxItemsInObjectGraph quota. '
I have tried to add a behavior node to the config file so that the MaxItemsInObjectGraph is higher, to no avail unfortunately:
<behavior name="routerServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" />
<dataContractSerializer ignoreExtensionDataObject="false" maxItemsInObjectGraph="2147483646" />
</behavior>
My guess is there is a limitation on the number of objects the service is allowed to serialize but I can’t make it work.
Any input will be greatly appreciated.
Best regards.