Jump to: navigation, search

Importing into the Knowledge Center Server

Using Indexer to Import Data

If you are not going to use a CMS you can use the indexer to import data for use with Genesys Knowledge Center.

The indexer is installed during the installation of Knowledge Center Server. It is located inside your Knowledge Center Server installation folder in the \server\tools\indexer subdirectory.

Options

POSIX-like options GNU-like long options Required Default Description
-h --host yes none Genesys Knowledge Center Server host
-f --file no ./ file or directory that contains indexed data for import
-t --transformer no file that contains a *.xsl transformer
-u --user yes none Authorization message
-a --authorization no none Credential for Basic Authorization on Knowledge Center Server (if enabled)
-sbt --subTenantId no sub-tenant identifier
-l --loop no false read "-f (--file)" file or folder infinitely

Usage

java -jar gks-indexer-${version}.jar
--host "http://%host%:%port%/gks-server"
--file "%path_to_repo%/tools/indexer/xml-datasets"
--transformer "gkc.xsl"
--user "gksuser"
--authorization "user name:user password"

XML example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<documents kbsId="knowledgeFAQ" lang="en">
    <document>
        <lang>en</lang>
        <question>Question from indexer</question>
        <answer>Answer from indexer</answer>
        <categories>
            <category>
                <name>Testing</name>
            </category>
            <category>
                <name>Actors</name>
            </category>
        </categories>
        <validTo>2015-12-31 00:00:00</validTo>
        <alternatives>
            <alternative>Alternative question from indexer</alternative>
        </alternatives>
        <media>
            <media>media indexer</media>
            <media>media indexer</media>
        </media>
        <tags>
            <tag>tag indexer</tag>
            <tag>tag indexer</tag>
        </tags>
        <url>indexer url</url>
        <customFields>
            <entry>
                <key>numfield</key>
                <value>123</value>
            </entry>
            <entry>
                <key>strfield</key>
                <value>Hello GKS</value>
            </entry>
            <entry>
                <key>datefield</key>
                <value>2015-12-31</value>
            </entry>
            <entry>
                <key>unexistingField</key>
                <value>I'm an unexisting custom field</value>
            </entry>
        </customFields>
        <created>2014-10-01 00:00:00</created>
        <modified>2014-12-31 00:00:00</modified>
        <attachments>
            <attachment>
http://www.the-digital-picture.com/Owners-Manuals/Canon-Speedlite-430ex-Flash-Manual.pdf
            </attachment>
        </attachments>
    </document>
</documents>

JSON example

{
    "kbsId": "knowledgebaseId",
    "lang": "en",
    "documents": [{
        "answer": "answer_1",
        "categories": [{
            "id": "cat_1_id",
            "name": "cat_1"
        }, {
            "id": "cat_2_id",
            "name": "cat_2"
        }],
        "created": "2013-09-08 13:15:33",
        "id": "document_1_id",
        "media": [
            "application",
            "audio"
        ],
        "modified": "2014-01-03 22:03:19",
        "question": "question_1",
        "tags": [
            "tag1",
            "tag2"
        ],
        "url": "google.com"
    }, {
        "answer": "answer_2",
        "categories": [{
            "id": "cat_1_id",
            "name": "cat_1"
        }, {
            "id": "cat_3_id",
            "name": "cat_3"
        }],
        "created": "2010-03-09 11:15:21",
        "id": "document_2_id",
        "media": [
            "video",
            "text"
        ],
        "modified": "2013-08-01 05:54:52",
        "question": "question_2",
        "tags": [
            "tag3",
            "tag4"
        ],
        "url": "genesys.com"
    }]
}


Importing Sample Data

You can use the Import Tool to add sample QNA data to your knowledge base. This tool is located in the ./server/tools directory in the Knowledge Center installation folder. It comes with the following resources:

  • knowledgeFAQ.xml—List of basic QNA data, provided with the Knowledge Center Server indexing tool
  • gks-indexer-tool.jar—Java-based indexing tool
  • importFAQ.bat—Simple data import script

Data Import Syntax

Important
Users must have Knowledge.AUTHOR privileges in order to use the Administrator plugin.

Use the following syntax to import data:

- java -jar gks-indexer-${version}.jar
--host "http://%host%:%port%/gks-server"
--file "%path_to_repo%/tools/indexer/xml-datasets"
--transformer "gkc.xsl"
--user "gksuser"
--authorization "user name:user password"

The authorization parameter is only required if you have enabled the security option for Knowledge Center Cluster.

Sample Import Script

Here is an example of what your import script might look like:

java -jar <Path to GKC Server>\GKC_Server\server\tools\gks-indexer-tool.jar 
--host "http://sample.com:9001/gks-server" 
--file "<Path to GKC Server>\GKC_Server\server\tools\knowledgeFAQ.xml"
--user "gkc_admin"

If it works, this script will import sample QNA data into the knowledge base.

Sample QNA Data

Here is an example of the data stored in the XML file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<documents kbsId="knowledgeFAQ" lang="en">
    <document>
        <question>What Is Knowledge Center?</question>
        <answer>The Genesys Knowledge Center ultimate goal is to convert 
your knowledge into the answers on the question your clients or agents have. 
It delivers set of the component for administration, authoring and using the 
knowledge. The heart of the system is the Knowledge Center Server that 
aimed to find the best answer on the question you have asked.</answer>
        <categories>
            <category>
                <name>General</name>
            </category>
        </categories>
    </document> 
</documents>
This page was last edited on August 28, 2015, at 21:42.
Comments or questions about this documentation? Contact us for support!