Skip to Content

Introduction

This blog is part of the complete step-by-step setup guide for SAP Mobile Documents. It describes how to connect TREX to SAP NetWeaver Java AS and how to setup an index for SAP NetWeaver Portal KM repositories. The article also explains how to use TREX for querying documents and folders inside KM repositories with the CMIS standard, which is possible since SAP Mobile Documents SP3 Patch 1.

Prerequisites

This article assumes that you already setup a running TREX instance that you want to connect to a SAP NetWeaver AS Java.

Step 1: Connect TREX to SAP NetWeaver AS Java

  • Open SAP NetWeaver AS Java administrator: http(s)://<hostname>:<port>/nwa
  • Navigate to: Configuration – Infrastructure – Java System Properties
  • Select Services and search for TREX Service
  • Add the hostname and port (tcpip://<hostname>:<port>) of your TREX instance to the following property: nameserver.address (The default port of TREX is 30001).On some systems TREX complains about a missing backupserver. In this case add your TREX server also to the following property: nameserver.backupserverlist
  • Press the “Save” Button to persist your changes

/wp-content/uploads/2014/12/1_613714.png

Step 2: Restart TREX Service on each cluster node:

  • Open SAP NetWeaver AS Java administrator: http(s)://<hostname>:<port>/nwa
  • Navigate to: Operations – Systems – Start & Stop
  • Select “Java Services” and search for “TREX Service”
  • Restart the TREX Service on each cluster node

/wp-content/uploads/2014/12/2_613730.png

Step 3: Verify the connection

  • Open SAP NetWeaver Portal: http(s)://<hostname>:<port>/irj
  • Navigate to: System Administration – Monitoring – TREX Monitor – Server Status
  • Verify if the TREX instance is successfully connected to your SAP NetWeaver AS Java (The status indicators should be green)
  • If the status indicators are not green try to restart the SAP NetWeaver AS Java and verify again

VerifyTrexInstallation.jpg

Step 4: Create an Index

  • Open SAP NetWeaver Portal: http(s)://<hostname>:<port>/irj
  • Navigate to: System Administration – Knowledge Management – Index Administration
  • Click “Create” to add a new index
  • Define an index ID, optionally a name and set “Service” to “Trex Search”

/wp-content/uploads/2014/12/4_613731.png

  • Press the “Define Schedule” button to define a schedule for the crawler. The crawler is responsible for determining and sending the information about the existing objects of a repository to the index queue.
  • Select “Daily” in the dropdown list to add a new cycle and configure a time when the crawler shall update the index
  • Confirm the schedule settings with the “OK” button

/wp-content/uploads/2014/12/5_613732.png

  • Create the index with a click on the “Save” Button.

Step 5: Add data sources (KM repositories) to the index

  • Navigate to: Data Sources and click “Add”

/wp-content/uploads/2014/12/6_613733.png

  • Select one or more km repositories that shall be indexed and press “OK”

/wp-content/uploads/2014/12/7_613734.png

Step 6: Adapt Queue Parameters

  • Open SAP NetWeaver Portal: http(s)://<hostname>:<port>/irj
  • Navigate to: System Administration – Knowledge Management – TREX Monitor – Edit Queue Parameters
  • Select the created Index ID in the drop down list
  • Change the Schedule Time to 5 minutes and press “Save”

9.PNG

Step 7: Verify the index

  • Open SAP NetWeaver Portal: http(s)://<hostname>:<port>/irj
  • Navigate to: System Administration – Knowledge Management – Indexing Monitor
  • Verify if the created index contains indexed items. If not, wait a few minutes and check again
  • If there are still no indexed items restart SAP NetWeaver AS Java and verify again

/wp-content/uploads/2014/12/8_613735.png

Use TREX for CMIS queries

Since SAP Mobile Documents SP3 Patch 1 the SAP NetWeaver Portal KM CMIS connector is able to perform CMIS queries with TREX. Executing CMIS queries with TREX is faster than the property search implementation and provides paging capabilities which is necessary to handle a huge amount of data.

The disadvantage of using TREX for performing CMIS queries is that it takes some time until property changes of documents and folders are reflected in the TREX index. Therefore it can happen that a TREX query returns data that is not up to date.

In order to use TREX as the query search engine append the string “USE TREX” to the end of the CMIS query statement. A simple statement might look like: SELECT * FROM cmis:document USE TREX

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. Felipe Requião Mello

    Hi Simon,

    I’ve already configured and installed the  SAP Mobile Documents and correctly connect it to my TREX instance. The problem is that i can’t figure out how configure the search by document content, could you please explain me that?

    Thanks,

    (0) 

Leave a Reply