Close
dtSearch Engine API for Java
Linux Platform

Using the dtSearch Engine for Java -- Linux Platform 

The Java interface to the dtSearch Engine is based on the Java Native Interface (JNI). Therefore, both the Java classes and a platform-specific binary executable are needed to use it. 

The Java classes are in examples\java\classes\dtSearchEngine.jar, which must be on the CLASSPATH. Adding the dtSearch Engine examples/java/classes folder to the CLASSPATH, or copying its contents to a folder on the CLASSPATH, will make these classes available in Java. 

Under Linux, the binary executable is libdtsearch.so, which must be accessed through a symbolic link named libdtsjava.so. libdtsjava.so must be in a folder that is on the LD_LIBRARY_PATH, or you will get an "Unsatisfied Link" exception when you try to use the dtSearch Engine classes in Java. You can also copy the dtSearch .so files to your /usr/local/lib folder, or use ldconfig to make them accessible on your system. 

Java version or later 1.4.1 is required. 

Samples 

A sample application is provided in examples\java\JavaDemo. To run the JavaDemo sample application:

cd dtsearch/examples/java chmod +x runJavaDemo.sh ./runJavaDemo.sh

A second sample application, dsource, demonstrates use of the DataSource interface to add fields to documents being indexed.

Additional Resources

For general information on using the dtSearch Engine API, such as the search request syntax, procedures for building and maintaining indexes, and options settings, see the Overviews section in dtSearchApiRef.chm. 

Additional developer documentation is posted on the External linkdtSearch technical support site