Below is the example of using the GetSearch operation for BI search of indexed repository objects. The request contains text for search, the response contains information about the objects, which metadata contains the specified text.
{ "GetSearch" : { "tMb" : { "id" : "S1!M" }, "tArg" : { "GetMbObjectsArg" : { "text" : "cube", "pattern" : { "n" : "true", "note" : "false", "id" : "true", "classId" : "true", "className" : "false", "content" : "false", "changeDate" : "false" } } } } }
{ "GetSearchResult" : { "GetMbObjectsResult" : { "resCount" : "1", "its" : { "it" : [ { "n" : "Cube", "hlName" : "<hlt>Cube<\/hlt>", "customRes" : { "Item" : { "fName" : "tag", "its" : { "Item" : "Test cube with fictitious data" }, "hlIts" : { "Item" : "Test <hlt>cube<\/hlt> with fictitious data" } } }, "docId" : "19815|OBJ19815", "k" : "19815", "Id" : "19815|OBJ19815", "hlId" : "", "classId" : "1281" } ] } } } }
public static GetSearchResult BiSearchMBObject(string mb, string text)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetSearch()
{
tArg = new GetSearchArg()
{
GetMbObjectsArg = new SearchMbObjectsArg()
{
pattern = new SearchMbObjectsPattern()
{
changeDate = false,
classId = true,
className = false,
note = false
},
text = text
}
},
tMb = new MbId() { id = mb }
};
//BI search of indexed objects
var result = somClient.GetSearch(tGet);
return result;
}
See also: