What does Knowledge Server 1.0 do?
Knowledge Server allows you to search text files and ODBC databases over the Internet from the applet KKQueryApplet.

What makes it cool?
It is blazingly fast on plain text and will easily outperform other query services despite the fact that it is not optimized yet.
You can output complete documents or only matched records to the results window. The applet user can copy and paste the information using the standard shortcut keys of his/her operating system.

Operating system requirements
Microsoft Windows for the server (Win95, 98 or NT). The query applet will run in any browser that supports Java 1.1, it does not require a specific platfrom. Any web server should do.

How to set it up
1. Copy the html file KKApplet.htm into your website. Do not change the applet width in the html page. You may, however change its HEIGHT parameter.
2. Copy KKQueryApplet.class into the same directory.
3. Copy all other .class files from the package into any directory on your web server.
4. Make sure you have Java 1.1 or higher installed on that server. You can download either the JDK or just the Runtime environment (JRE) from www.javasoft.com.
The default JAVA_HOME is C:\Program Files\JavaSoft\JRE\1.2 You can also try to run KKServer (type: java KKServer) to find out where the JAVA_HOME folder is. 5. In the JAVA_HOME folder, make a new directory called "kk". Make sure the name is all lower case. This will be the root of your Knowledge Server structure.
6. Into the folder kk, unzip the file sample.zip. Make sure you use folder names.
You should now have the folder kk with three subdirectories that contain files.
7. MOVE the file testmemory.doc.mdb OUT of this structure and into any folder on the same machine. If you do not do this, you may encounter problems.
8. Now make a DSN for this database, so that KKServer can use it. In the Control Panel, open ODBC32. Click the Configure button. Enter glos as Data Source Name on the first tab (User DSN). Select Microsoft Access Driver from the Drivers tab. Click Select and navigate to the folder into which you moved testmemory.doc.mdb, select the file there. Click Advanced, enter admin as Login Name. Do not enter a password. Click OK to save this setup.

Running the KKServer demo
Start KKServer by typing java KKServer at a command prompt in the directory where KKServer.class is located. If it is not in the java path, you will get an error message.
If java.exe is in C:\Program Files\JavaSoft\JRE\1.2\bin, type C:\Program Files\JavaSoft\JRE\1.2\bin\java KKServer.

If your web server is not started, start it now. Start your web browser, go to the page with the query applet.
When the applet is displayed, select "KnowledgeBase" as the area from the drop-down list.
Select "Database with Numbers" from the new list in the list box.
Click "Send" WITHOUT entering any text to search for.
If your database setup is exactly as described above, a list with numbers will be returned in the results area.
If you get an error or nothing is returned, please check the DSN setup again.
Next, select "db2" from the drop-down list and enter ONE into the "text to search" field. Click "Send".
You will get a list containing only the records that match the text "ONE".
Select "...up one level", then select "Glossaries", then use the first one that is displayed.
Type button into the search text field and click "Send".
Select "...up one level", then select "General", then use the first one that is displayed.
CLEAR the search text field and click "Send".
The whole contents of the "Engineers" file will be displayed.

Adding more full-text files
You can add more text files with the extension txt to the existing area folders or make new areas and add files to them.
Make sure that the top level (with General, Glossaries etc. in the sample) contains folders only.
Add files to that folder. Do not add another sub-level of folders.
Each line in a text file is treated as a "record". Check out the example files.

Adding more databases
You can add more database files with the extension mdb to the existing area folders or make new areas and add files to them.
Make sure that the top level (with General, Glossaries etc. in the sample) contains folders only.
Add files to that folder. Do not add another sub-level of folders.
Each database file must contain a SINGLE line that has a SQL query. Check out the example files.
The format of a database file is:

jdbc:odbc:glos select * from tabl1 admin

jdbc:odbc:"yourDSN" tab "your SQL query" tab "user name" tab "password"
"user name" and "password" are optional. The DSN and a query are mandatory.
The above query returns the full contents of tabl1.
To find records that match a string entered by the user in the applet's "search text" field, use the placeholder SEARCHFOR as in this query:
jdbc:odbc:glos SELECT * From Tabl1 Where Tabl1.Text='SEARCHFOR' admin
The server will replace SEARCHFOR with the text the applet user sent. For example, when you entered ONE, the server queried the database with the statement:
SELECT * From Tabl1 Where Tabl1.Text='ONE'

To be able to add a new database, you need
1. a database that resides on the web server.
2. the database must be correctly set up in the ODBC control panel.
3. you must know the layout of the database (table names, field names etc.) to be able to write a SQL query.
4. ALWAYS test your queries in MS SQL or another SQL tool before you put them into a new file on the Knowledge Server.
5. Only ONE query must be placed into each .mdb file.
7. The file extension for database query files MUST be .mdb

Limitations of Knowledge Server
1. No support for Western languages mixed with Far East/Eastern European. KKServer uses the default system locale.
2. The total number of items in the kk folder structure must not exceed 1 million. This means, the total of lines in all files plus the filenames and the directory names must be less than 1 million.
3. Maximum memory usage depends on how many items your kk structure contains. The server only maintains a single shared object for all clients.
4. No column names are displayed in this version for database results.
5. The first query of a database will be slow because the server loads the query class. Any subseqent queries will be very fast.
6. There is NO provision for working through firewalls or with proxy servers. This means, KKServer and the data have to be outside of the firewall for use over the Internet.
7. The data in the kk structure cannot be updated while KKServer is running.
For the databases, this only means, you cannot add or modify queries -- the contents of a database can be changed freely. To add, delete or modify files in the kk structure, shut KKServer down, make the changes, then restart KKServer.