Documentation on the IndexManagement Web Service

This is the documentation on the IndexManagement Web Service. Index Management.

The functionality is split into aspects - each focusing on certain areas of functionality. See below for information on these aspects. Each aspect consists of different methods which are all visible at the Web Service, complex types which are used in the signatures of the methods and exceptions thrown by these methods. Methods have input and output parameters. Complex types have fields and methods, which again have input and output parameters. Exceptions carry data. The methods offer a procedural API, the complex types are used as value objects/data transport objects whenever primtive data types were not sufficient and the exceptions encapsulate more valuable information than plain SOAP faults.

Aspects

Index Index management operations.
PerfIdxMgmt Performance operations.
CfgIdxMgmt Config operations.


Index Aspect

This aspect covers index management operations. It provides some basic management features to create/delete indexes and to attach/detach datasources as well as the search funtionality.

Methods and Parameters for Aspect Index

void createIndex(String indexId, String indexName, String indexGroup, String serviceId, CustomProperty[] customProperties, String crawlerProfileId, int whatToIndex)
Creates an index.
void deleteIndex(String indexId)
Deletes the specified index.
void attachDataSource(String indexId, String rid, SchedulerTimeTable schedulerTimeTable)
Attaches a datasource to an existing index.
void detachDataSource(String indexId, String rid)
Detaches a datasource from the given index.
void reindex(String indexId)
Triggers reindexing of an existing index.
void deltaReindex(String indexId)
Performs reindexing of not yet indexed or changed documents.
SearchResultChunk searchFirstChunkInFolders(String[] rids, QueryEntry[] queryEntries, com.sap.netweaver.bc.rf.ws.namespace.CollatorEntry collatorEntry, String[] languages, com.sap.netweaver.bc.rf.ws.lookup.FetchGroup fetchGroup, long timeout, int count)
Perfomes a search on one or multiple folders.
SearchResultChunk searchFirstChunkInIndexes(String[] indexIds, QueryEntry[] queryEntries, com.sap.netweaver.bc.rf.ws.namespace.CollatorEntry collatorEntry, String[] languages, com.sap.netweaver.bc.rf.ws.lookup.FetchGroup fetchGroup, long timeout, int count)
Perfomes a search on one or multiple indexes.
SearchResultChunk searchNextChunk(String token, int count)
Returns the next set of matches.
String getResourceContentAsHtml(String rid, QueryEntry[] queryEntries)
Returns the resource content as html.
boolean flushQueue(String rid, int noOfTries)
Flushes the queue of the given rid.
String[] getAllIndexIds()
Returns all index ids of the system.
void indexResource(String rid, String index)
Indexes the resource with the given rid.
void indexResources(String[] rids, String index)
Indexes the resources with the given rids.
void deindexResource(String rid, String index)
Deindexes the resource with the given rid.
void deindexResources(String[] rids, String index)
Deindexes the resources with the given rids.
void clear(String index)
All documents are removed from the index.


Complex types for Aspect Index

CustomProperty Additional index implementation specific property.
SchedulerTimeTable Some basic schedulers (daily, hourly, minutely).
QueryEntry Single Entry of a complex search query.
SearchResultChunk The chunked result of a index management search.
SearchMatch A single match of the search.


Method and Parameters Details for Aspect Index

createIndex

public void createIndex(String indexId, String indexName, String indexGroup, String serviceId, CustomProperty[] customProperties, String crawlerProfileId, int whatToIndex)

Creates an index using the given parameters. The service id can be configured in the portal, SAP delivers "trexSearch", "trexSearchAndClassification" and "trexClassification". The custom properties are index implementation specific properties. The whatToIndex parameter describes which resource types to index: 1 - all, 2 - no collections will be indexed, 3 - only collections will be indexed.

Parameters:
Throws:


deleteIndex

public void deleteIndex(String indexId)

Deletes the specified index.

Parameters:
Throws:


attachDataSource

public void attachDataSource(String indexId, String rid, SchedulerTimeTable schedulerTimeTable)

Attaches a datasource to an existing index with the specified scheduler time table to trigger the crawler run.

Parameters:
Throws:


detachDataSource

public void detachDataSource(String indexId, String rid)

Detaches a datasource from the given index.

Parameters:
Throws:


reindex

public void reindex(String indexId)

Triggers reindexing. Clears the index and starts putting all documents into the index again.

Parameters:
Throws:


deltaReindex

public void deltaReindex(String indexId)

Performs indexing of the documents that are not yet indexed or have been changed since the last crawl. Additionally, it deindexes documents from the index that were indexed but have since been deleted. In contrast to the reindex method, this call does not clear the index.

Parameters:
Throws:


searchFirstChunkInFolders

public SearchResultChunk searchFirstChunkInFolders(String[] rids, QueryEntry[] queryEntries, com.sap.netweaver.bc.rf.ws.namespace.CollatorEntry collatorEntry, String[] languages, com.sap.netweaver.bc.rf.ws.lookup.FetchGroup fetchGroup, long timeout, int count)

Initializes a search session on one or multiple folders using a query (given by a list if queryEntries) and sorting criteria (given by the collator entry parameter), executes the search and returns the first set of matches.

Parameters:
Returns:
Throws:


searchFirstChunkInIndexes

public SearchResultChunk searchFirstChunkInIndexes(String[] indexIds, QueryEntry[] queryEntries, com.sap.netweaver.bc.rf.ws.namespace.CollatorEntry collatorEntry, String[] languages, com.sap.netweaver.bc.rf.ws.lookup.FetchGroup fetchGroup, long timeout, int count)

Initializes a search session on one or multiple indexes using a query (given by a list if queryEntries) and sorting criteria (given by the collator entry parameter), executes the search and returns the first set of matches.

Parameters:
Returns:
Throws:


searchNextChunk

public SearchResultChunk searchNextChunk(String token, int count)

Returns the next set of resources of a previously initiaized (searchResourcesFirstChunk) search session identified by the certain token.

Parameters:
Returns:
Throws:


getResourceContentAsHtml

public String getResourceContentAsHtml(String rid, QueryEntry[] queryEntries)

Returns the resource content as html.

Parameters:
Returns:
Throws:


flushQueue

public boolean flushQueue(String rid, int noOfTries)

Tries to flush the queue of the rid. It tries the given number one try per second. So be aware that you could get a timeout.

Parameters:
Returns:
Throws:


getAllIndexIds

public String[] getAllIndexIds()

Returns all index ids existing in the system.

Returns:
Throws:


indexResource

public void indexResource(String rid, String index)

Indexes the resource specified by the rid. WARNING: The resource is indexed just once and never updated or removed if the corresponding resource has been removed.

Parameters:
Returns:
Throws:


indexResources

public void indexResources(String[] rids, String index)

Indexes the resources specified by the rids. WARNING: The resources are indexed just once and never updated or removed if the corresponding resources have been removed.

Parameters:
Returns:
Throws:


deindexResource

public void deindexResource(String rid, String index)

Deindexes the resource specified by the rid from the given index.

Parameters:
Returns:
Throws:


deindexResources

public void deindexResources(String[] rids, String index)

Deindexes the resources specified by the rids from the given index.

Parameters:
Returns:
Throws:


clear

public void clear(String index)

All resources are removed from the index and the index is set to an initial state. The configuration for the index remains, but all resources must be indexed again.

Parameters:
Returns:
Throws:


Complex Type Details for Aspect Index

CustomProperty

Additional index implementation specific property (i.e. TrexSearchIndex has the property "fuzziness" that can have values from 0.0 to 1.0).

Fields and Constants
String name Field: Property name
String value Field: Property value

SchedulerTimeTable

Some basic schedulers (daily, hourly, minutely).

Fields and Constants
int frequency Field: Time frequency at which something should be executed
" FREQUENCY_NOT_NULLABLE_WORKAROUND Constant with value 0: Please ignore this field! It's a WS workaround for now!
" FREQUENCY_EVERY_MINUTE Constant with value 1: Every minute
" FREQUENCY_EVERY_HOUR Constant with value 2: Every hour
" FREQUENCY_EVERY_DAY Constant with value 3: Every day

QueryEntry

Single Entry of a complex search query. The entry types along with there possible parameter in detail are:

The term weight parameter gives the importance of the particular term to rank the matches and is only relevant for TYPE_TERM_FOR_CONTENT_SEARCH and TYPE_TERM_FOR_PROPERTY_SEARCH.

Fields and Constants
int type Field: Type of query entry (terms and literals including brackets)
" TYPE_TERM_FOR_CONTENT_SEARCH Constant with value 1: Content search term for searches in content
" TYPE_TERM_FOR_PROPERTY_SEARCH Constant with value 2: Property search term for searches in properties
" TYPE_OPERATOR Constant with value 3: Operator combining query entries (e.g. AND or OR)
" TYPE_BRACKET_OPEN Constant with value 4: Opening bracket for grouping purposes
" TYPE_BRACKET_CLOSE Constant with value 5: Closing bracket for grouping purposes
float weight Field: Weight of a query entry with respect to the whole query (Optional)
int action Field: Defines the way the search is executed (Optional)
" ACTION_NOT_NULLABLE_WORKAROUND Constant with value 0: Please ignore this field! It's a WS workaround for now!
" ACTION_EXACT Constant with value 1: Exact search (identical words, e.g. review=review)
" ACTION_FUZZY Constant with value 2: Fuzzy search (similar words, e.g. review=rveiew)
" ACTION_LINGUISTIC Constant with value 3: Linguistic search (word stamming, e.g. review=reviewer)
float fuzziness Field: Defines how large the term is relaxed to find search results (Optional)
String propertyName Field: Property name for property term query entries (Optional)
int valueType Field: Value type of property for property term query entries (Optional)
" VALUETYPE_NOT_NULLABLE_WORKAROUND Constant with value 0: Please ignore this field! It's a WS workaround for now!
" VALUETYPE_DATE Constant with value 2: Date type
" VALUETYPE_INTEGER Constant with value 3: Integer type
" VALUETYPE_STRING Constant with value 5: String type
int propertyOperator Field: Property operator for property term query entries (Optional)
" PROPERTYOPERATOR_NOT_NULLABLE_WORKAROUND Constant with value 0: Please ignore this field! It's a WS workaround for now!
" PROPERTYOPERATOR_EQUALS Constant with value 1: Property equals value
" PROPERTYOPERATOR_NOTEQUALS Constant with value 2: Property not equals value
" PROPERTYOPERATOR_BETWEEN Constant with value 3: Property between value and limit
" PROPERTYOPERATOR_GREATER Constant with value 4: Property greater than value
" PROPERTYOPERATOR_GREATEREQUALS Constant with value 5: Property greater than value or equals
" PROPERTYOPERATOR_LESS Constant with value 6: Property less than value
" PROPERTYOPERATOR_LESSEQUALS Constant with value 7: Property less than value or equals
String value Field: Value for content or property term or operator (Optional)
String limit Field: Upper limit for property operator PROPERTYOPERATOR_BETWEEN (Optional)

Depending on the selected query type different fields of the queryEntry are optional or mandatory. For type 1, a content search the following fields can be used

For type 2, a property search, the following fields can be used For type 3, an operator only the field value has to be specified. The value can contain "AND" or "OR", depending on the oprator which is needed.

For type 4 and 5, the brackets, no additional fields have to be specified.

SearchResultChunk

The search result. It containes of the requested (by 'searchFirstResultChunk' or 'searchNextResultChunk') number of matches, query entries that you could have meant, the total number of results (without checking if the searching user has granted permission) and a token to identify the result.

Fields and Constants
SearchMatch[] matches Field: The requested matches.
int totalMatchesNumber Field: The total numer of matches of the search.
QueryEntry[] doYouMean Field: The query entries you could have meant.
String token Field: The token identifying the result.

SearchMatch

A single match of the search. It containes of the resource found, a content snippet of the resources content, the rlevance of the match according to the query and the resources document features.

Fields and Constants
com.sap.netweaver.bc.rf.ws.lookup.Resource resource Field: The matching resource.
String contentSnippet Field: A content snipped extracted from the resource.
float rank Field: The rank of the match according to the query (0.0 - 1.0).
String indexId Field: The index in which the match was found.

PerfIdxMgmt Aspect

This aspect covers performance issues and is needed for Web Service maintenance purposes only. Performance information supports developers in using and optimizing the Service. Among other information the processing time (on average/last call) or failure rate (number of caught exceptions in relation to number of made calls) can be queried per Web Service method.

Methods and Parameters for Aspect PerfIdxMgmt

PerfStoreIdxMgmt getGlobalPerf()
Get global performance data.
void resetGlobalPerf()
Reset global performance data.
PerfStoreIdxMgmt getSessionPerf()
Get session performance data.
void resetSessionPerf()
Reset session performance data.
PingDataIdxMgmt ping(int calls, int threads)
Return immediately or re-ping given number of times.


Complex types for Aspect PerfIdxMgmt

PerfStoreIdxMgmt Performance store
PerfOnBeanIdxMgmt Performance on bean
PerfOnMethodIdxMgmt Performance on method
PingDataIdxMgmt Ping data


Method and Parameters Details for Aspect PerfIdxMgmt

getGlobalPerf

public PerfStoreIdxMgmt getGlobalPerf()

Get global performance data.

Returns:
Throws:


resetGlobalPerf

public void resetGlobalPerf()

Reset global performance data.

Returns:
Throws:


getSessionPerf

public PerfStoreIdxMgmt getSessionPerf()

Get session performance data.

Returns:
Throws:


resetSessionPerf

public void resetSessionPerf()

Reset session performance data.

Returns:
Throws:


ping

public PingDataIdxMgmt ping(int calls, int threads)

Return immediately or re-ping given number of times.

Parameters:
Returns:
Throws:


Complex Type Details for Aspect PerfIdxMgmt

PerfStoreIdxMgmt

A performance store object holds information on all meassured performance information bits of the Web Service.

Fields and Constants
int scope Field: Scope
" SCOPE_GLOBAL Constant with value 1: Global
" SCOPE_SESSION Constant with value 2: Session
PerfOnBeanIdxMgmt perfOnBean Field: Performance on bean
PerfOnMethodIdxMgmt[] perfOnMethods Field: Performance on methods

PerfOnBeanIdxMgmt

A performance-on-bean object holds information on the bean used to implement the Web Service.

Fields and Constants
long createCount Field: Create count
long setSessionContextCount Field: Set session context count
long removeCount Field: Remove count
long activateCount Field: Activate count
long passivateCount Field: Passivate count

PerfOnMethodIdxMgmt

A performance-on-method object holds information on all meassured performance information bits of a single Web Service method.

Fields and Constants
String name Field: Name
long allCallCount Field: All call count
long allFailureCount Field: All failure count
double allFailureRate Field: All failure rate
long allRuntimeOverall Field: All runtime overall
double allRuntimeAverage Field: All runtime average
double allThroughputAverage Field: All throughput average
Date lastBegintime Field: Last begintime
Date lastEndtime Field: Last endtime
long lastRuntime Field: Last runtime
String lastFailure Field: Last failure

PingDataIdxMgmt

A ping data object holds information retrieved during a ping call. e.g. made for round-trip time evaluation purposes.

Fields and Constants
long callCount Field: Call count
Date begintime Field: Begintime
Date endtime Field: Endtime
long runtimeOverall Field: Runtime overall
double runtimeAverage Field: Runtime average
double throughputAverage Field: Throughput average
String failure Field: Failure

CfgIdxMgmt Aspect

This aspect covers config operations and is needed for Web Service maintenance purposes only. Configuration settings define various runtime properties of the Web Service. Among other settings performance measurement can be switched on or off.

Methods and Parameters for Aspect CfgIdxMgmt

CfgStoreIdxMgmt getGlobalCfg()
Get the actual configuration.
CfgStoreIdxMgmt setGlobalCfg(CfgStoreIdxMgmt cfgStore)
Set and afterwards get the actual configuration.
BuildInfoIdxMgmt getBuildInfo()
Get build info listing information available from build.


Complex types for Aspect CfgIdxMgmt

CfgStoreIdxMgmt Config store
BuildInfoIdxMgmt Build info


Method and Parameters Details for Aspect CfgIdxMgmt

getGlobalCfg

public CfgStoreIdxMgmt getGlobalCfg()

Get the actual configuration.

Returns:
Throws:


setGlobalCfg

public CfgStoreIdxMgmt setGlobalCfg(CfgStoreIdxMgmt cfgStore)

Set and afterwards get the actual configuration.

Parameters:
Returns:
Throws:


getBuildInfo

public BuildInfoIdxMgmt getBuildInfo()

Get build info object listing all information available during the build of this shipment.

Returns:
Throws:


Complex Type Details for Aspect CfgIdxMgmt

CfgStoreIdxMgmt

A config store object holds all configuration settings for the Web Service.

Fields and Constants
boolean perfActive Field: Performance meassuring active
boolean traceActive obsolete
boolean netconActive obsolete
long contentSizeLimit Field: Content size limit
long tokenLifetimeLimit Field: Token lifetime limit

BuildInfoIdxMgmt

A build info object lists all information available during the build of this shipment and helps to answer questions like what, when, where or by whom has this shipment been build.

Fields and Constants
String releaseName Field: Release name
String projectName Field: Project name
String subprojectName Field: Subproject name
String buildDate Field: Build date
String buildChangelist Field: Build changelist
String buildServer Field: Build server
String buildLocation Field: Build location
String modelDate Field: Model date
String modelChangelist Field: Model changelist
String modelRevision Field: Model revision
String japroInfo Field: Japro info
String manifestInfo Field: Manifest info
String modelDefintion Field: Model defintion

Exceptions

IncompleteIndexOperationException Operation on multiple resources in index call failed.
IncompleteDeindexOperationException Operation on multiple resources in deindex call failed.


IncompleteIndexOperationException

This exception indicates a index mass call handling resources failed partly (e.g. lookup of multiple resources). A mass call operation failed partly - a mass call executes a single operation on multiple resources. When the operation failes for a single resource, the mass call will continue its execution, but at the end an IncompleteOperationException will be thrown, providing the partially computed results and the caught exceptions. The partially computed results are ordered (as defined by the ingoing parameters) and nulls have been inserted for each operation failed on a resource. For each null the caught exception is stored inside the list of exceptions carried along with the partially computed results (also ordered).

Fields and Constants
String[] successRids Field: Rids of successfull indexed Resources
OperationFailedException[] exceptions Field: Exceptions


IncompleteDeindexOperationException

This exception indicates a deindex mass call handling resources failed partly (e.g. lookup of multiple resources). A mass call operation failed partly - a mass call executes a single operation on multiple resources. When the operation failes for a single resource, the mass call will continue its execution, but at the end an IncompleteOperationException will be thrown, providing the partially computed results and the caught exceptions. The partially computed results are ordered (as defined by the ingoing parameters) and nulls have been inserted for each operation failed on a resource. For each null the caught exception is stored inside the list of exceptions carried along with the partially computed results (also ordered).

Fields and Constants
String[] successRids Field: Rids of successfull deindexed Resources
OperationFailedException[] exceptions Field: Exceptions