I'm doing a search that includes unmanaged objects and ran into what may be a bug. With my testing I found that doing a text search for the string 'to' from the API that includes unmanaged objects gives me an error (Executing the search failed. (116)). Doing a text search for 'to' and not including unmanaged objects does work. Doing a text search for 'to' in the M-Files Desktop does work and does return unmanaged objects. It's just from the API you get the error. Here's my simple test:
var SCs = new SearchConditions();
var condition= new SearchCondition();
condition.Expression.SetAnyFieldExpression(MFFullTextSearchFlags.MFFullTextSearchFlagsLookInMetaData);
condition.ConditionType = MFConditionType.MFConditionTypeContains;
condition.TypedValue.SetValue(MFDataType.MFDatatypeText, "to"); // testing. for some reason 'to' throws an error on the search Executing the search failed. (116)
SCs.Add(-1, condition);
var objectList = myparams.vault.ObjectSearchOperations.SearchForObjectsByConditionsEx(SCs,
MFSearchFlags.MFSearchFlagIncludeUnmanagedObjects, false, 0, 0);
Here's the error:
Executing the search failed. (116)
CoVaultObjectSearchOperations.cpp, 528, Executing the search failed. (116) (0x80040418)
ServerVaultObjectSearchOperationsHelper.cpp, 97, Executing the search failed. (116) (0x80040418)
ServerVaultObjectSearchOperationsHelper.cpp, 531, Executing the search failed. (116) (0x80040418)
LatestRPC.generated.cpp, 33816, Executing the search failed. (116) (0x80040418)
RPCSearch.cpp, 1739, Executing the search failed. (116) (0x80040418)
RPCSearch.cpp, 672, Executing the search failed. (116) (0x80040418)
MCallInLoop.h, 712, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 3025, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 4796, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 17154, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 17339, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 17288, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 17681, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 17994, Executing the search failed. (116) (0x80040418)
RPCSearchHelper.cpp, 18056, Executing the search failed. (116) (0x80040418)
ObjectSearcher_FullInfo.cpp, 1133, Executing the search failed. (116) (0x80040418)
ExternalRepositorySearcher.cpp, 794, Executing the search failed. (116) (0x80040418)
ExternalRepositorySearcher.cpp, 949, Executing the search failed. (116) (0x80040418)
ExternalRepositorySearcher.cpp, 1001, Executing the search failed. (116) (0x80040418)
ExternalRepositorySearcher.cpp, 1162, Executing the search failed. (116) (0x80040418)
ExternalRepositorySearcher.cpp, 1660, Executing the search failed. (116) (0x80040418)
(M-Files 22.6.11534.5 2022-07-20T18:49:18.690Z)
(0034)
at MFilesAPI.VaultObjectSearchOperationsClass.SearchForObjectsByConditionsEx(SearchConditions SearchConditions, MFSearchFlags SearchFlags, Boolean SortResults, Int32 MaxResultCount, Int32 SearchTimeoutInSeconds)