Copyright © 2006 Together Teamlösungen EDV-Dienstleistungen GmbH
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the Together Teamlösungen EDV-Dienstleistungen GmbH.
Together Teamlösungen EDV-Dienstleistungen GmbH DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Table of Contents
List of Tables
Table of Contents
In order to use the Metadata feature of 'Together Search Server' the following steps are to be performed.
The first step is to create a metadata database. In the database a table should be created with following columns in the same order as written here. The column names are arbitrary and are given here only as an example:
OID - int, object ID
FILENAME - Varchar(254), file path
KEY - Varchar(254), metadata key name
VALUE - Varchar(254), metadata value for the given key
After the successful database/table creation, the metadata table should be filled out with file paths to the files to be indexed along with their key and value pairs.
An example:
The next step is to configure the 'Together Search Server Admin' application to have access to Metadata database.
The datasource for the database should be declared in the tssAdmin.xml. Here is an example of a datasource declaration:
<Resource name="metaDB" type="javax.sql.DataSource" maxWait="5000" maxActive="40" password="" maxIdle="10" username="sa" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:${catalina.base}/hsql/ metaDB / metaDB" />
Parameters:
Resource name
is the datasource name for the
database that will be used throughout the application.
driverClassName
is the name of the driver class
used
url
is the url to the database
In addition to this configuration file, the web.xml configuration file should as well be edited to reflect the changes made in the tssAdmin.xml.
In the DatabaseManager/Databases[] entry, the include database name should be declared as in this example:
<env-entry>
<env-entry-name>DatabaseManager/Databases[]</env-entry-name>
<env-entry-value>metaDB</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
In the following listing are the additional declarations needed for the Metadata database to be operational. The examples are given :
<env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /ClassType</env-entry-name> <env-entry-value>HypersonicSQL</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /ObjectId/NextWithPrefix</env-entry-name> <env-entry-value>true</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /Connection/ShutDownString</env-entry-name> <env-entry-value>CHECKPOINT</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /Connection/DataSourceName</env-entry-name> <env-entry-value>jndi: metaDB </env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /ConnectionAllocator</env-entry-name> <env-entry-value> com.lutris.appserver.server.sql.datasource.DataSourceConnectionAllocator </env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /Connection/ConnectionFactory</env-entry-name> <env-entry-value> com.lutris.appserver.server.sql.DataSourceDBConnectionFactory </env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /ObjectId/MinValue</env-entry-name> <env-entry-value>1000000</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> <env-entry> <env-entry-name>DatabaseManager/DB/ metaDB /Connection/MaxPoolSize</env-entry-name> <env-entry-value>10</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry>
A Metadata database for a Site is defined in configuretion file ('siteConf.xml'). The information about the MetaData list should be entered:
Metadata Database: is the resource name defined in tssAdmin.xml
Metadata Table: table where the metadata are stored
Metadata File Column: column in the table where the file paths are stored
Metadata Key Column: column in the table where property key are stored
Metadata Value Column: column in the table where property values are stored
In order to run the metadata list on a database server other than HSQL, the following modification should be performed:
In the tssAdmin.xml the proper driver and url should be entered Supported values: HypersonicSQL, PostgreSQL, DB2, QED, MySQL, Sybase, Oracle, MSQL.
Example for MSQL:
<Resource name="metaDB" type="javax.sql.DataSource" maxWait="5000" maxActive="40" password="" maxIdle="10" username="sa" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName= metaDB;SelectMethod=cursor"/>
In the web.xml the
<env-entry-name>DatabaseManager/DB/
metaDB
/ClassType</env-entry-name>
value should be
changed to the proper database. i.e. MSQL.