Create a thesaurus in the ibi™ Patterns - Search Server.


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

Syntax

Visual Basic (Declaration)
Public Sub thcreate( _ 
   ByVal thes As NetricsThesaurus _ 
)
C#
public void thcreate(
   NetricsThesaurus thes
)
C++
public:
 void thcreate(
   NetricsThesaurus thes
) sealed 
J#
public void thcreate(
   NetricsThesaurus thes
)
JScript
public  function thcreate(
   thes : NetricsThesaurus
)

Parameters

thes
The NetricsThesaurus object to create on the ibi™ Patterns - Search Server. The name and synonyms of the thesaurus are defined by using the thesaurus object's methods.

Exceptions

Exception TypeCondition
NetricsExceptionIf the server indicates that an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING)

Example

This sample shows how to create a thesaurus 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);
                       // Thesaurus input csv file
                       String file = "c:\\temp\\nicknames.csv";
                       // Thesaurus name
                       String thesaurus = "nicknames";
                       // Use default encoding which is LATIN1 specified by the null
                       NetricsThesaurus thes = new NetricsThesaurus(thesaurus, file, null);
                       si.thcreate(thes);
                       Console.WriteLine("Thesaurus created");
                   }
                   catch (NetricsException e)
                   {
                       Console.Write(e.getErrorDescription() + "\n");
                   }
                 }
              }
            

See Also