Lists the thesauruses currently loaded in the ibi™ Patterns - Search Server.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Function thlist() As String()
C#
public string[] thlist()
C++
public:
 array<String>^ thlist() sealed 
J#
public string[] thlist()
JScript
public  function thlist() : String[]

Return Value

An array of Strings, one per thesaurus loaded in the ibi™ Patterns - Search Server.

Exceptions

Exception TypeCondition
NetricsExceptionIf the server indicates that an error has occured (Possible errors - THESNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT)

Example

This sample shows how to list all thesauri in an ibi™ Patterns - Search Server.

 Copy Code
            using NetricsServerInterface;  
            class MyClass 
              {
                private static NetricsServerInterface.NetricsServerInterface si = null;     
                public static void Main() 
                 {
                   try
                   {
                       String host = "localhost";
                       int port = 5051;
                       si = new NetricsServerInterface.NetricsServerInterface(host, port);
                       String[] response = si.thlist();
                       String data = null;
                       for (int i = 0; i < response.Length; i++)
                       {
                           data = response[i];
                           Console.Write("Thesaurus name = " + data + "\n");
                       }
                       if (response.Length == 0)
                           Console.Write("No thesauruses loaded.");
                   }
                   catch (NetricsException e)
                   {
                       Console.Write(e.getErrorDescription() + "\n");
                   }
                 }
              }
            

See Also