|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a generic index object of the index management service.
The main properties of an index are:
To get an index object, follow this example:
String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId);
IIndexService,
IIndexFolder| Method Summary | |
void |
addFolderUri(URI folderUri)
Deprecated. as of NW04. Use add(IIndexFolder) at the IIndexFolderList interface |
void |
checkProperties(java.util.Properties customProperties)
With this method the properties that should be set could be checked. |
void |
clear()
All documents are removed from the index and the index is set to an initial state. |
void |
createIndexOnServer()
Creates the index on the index server connected with the CM system. |
void |
deindexDocument(IResource resource)
Removes a document from the index. |
void |
deindexDocument(RID rid)
Removes a document from the index. |
void |
deindexDocument(URI uri)
Deprecated. as of NW04. Use deindexDocument(RID) |
void |
deindexDocuments(IResourceList resources)
Removes a list of documents from the index It is recommended that you do not deindex documents manually using this method. For repositories that send cm events, documents are deindexed automatically when they are deleted. For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. |
void |
deindexDocuments(IRidList rids)
Removes a list of documents from the index It is recommended that you do not deindex documents manually using this method. For repositories that send cm events, documents are deindexed automatically when they are deleted. For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. |
void |
deindexDocuments(IUriList uris)
Deprecated. as of NW04. Use deindex documents(IRidList) |
void |
delete()
Deprecated. as of NW04. Use deleted(IResourceContext) |
void |
delete(IResourceContext context)
Deletes the index physically Important: To delete an index the deleteIndex(IIndex)
method of the IIndexService interface should be used
instead of this. |
void |
deleteOnServer()
Deletes the index on the index server connected with the CM system. |
void |
deltaReindex()
Performs indexing of the documents that are not yet indexed or have been changed since the last crawl. |
void |
generate()
Deprecated. as of NW04. Use generate(IResourceContext) |
void |
generate(IResourceContext context)
Generates the index physically after creating the index object and initializing it The index data is only saved on CM side if the index could be generated successfully. |
java.lang.String |
getCrawlerProfileId()
ID of the default crawler profile for all index folders of the index. |
IUriList |
getFolderUris()
Deprecated. as of NW04. Use getIndexFolders() |
IPropertyMap |
getIndexedProperties()
Returns the properties, indexed with the documents in the index. |
IIndexFolder |
getIndexFolderForDocument(RID documentRid)
Gets the index folder according to which the document is assigned to the index Only index folders of this index are checked against the document. |
IIndexFolderList |
getIndexFolders()
Folders or start pages that are assigned to the index for indexing. |
java.lang.String |
getIndexGroup()
Returns the group of indexes to which the index logically belongs. |
java.lang.String |
getIndexId()
Identifies the index within the system. |
AbstractIndex.IndexingState |
getIndexingState()
|
java.lang.String |
getIndexName()
Non-technical identifier of an index. |
java.util.List |
getLanguagesOfIndexedDocuments()
Returns the languages of an index, for which documents exist in. |
java.util.Properties |
getProperties()
These properties of the index are only the ones that are specific for an index implementation. |
java.lang.String |
getResourceInfo(IResource resource)
Returns information about the resource with respect to the actual index e.g. the status of the document as well as general about the index e.g. its service types. |
RID |
getRID()
Gets the resource ID of the resource representation of this index. |
ISchedulerTimeTable |
getSchedulerTimeTable()
Returns the timetable of a schedule for delta index crawling for the index. |
java.lang.String |
getServiceId()
Specifies the index implementation that is used for the index. |
java.util.List |
getServiceTypes()
Determines the kind of index A document can only be indexed into one index of an particular service type. Examples of service types are "search" and "classification". |
java.util.List |
getServiceTypes(java.util.Locale locale)
Displays representations of the indexes service types in the locale's language. |
ISupportedOptionSet |
getSupportedOptions()
The actions of the additional interfaces of an index are supported actions for the index in question (for example, ISearchIndex, IClassificationIndex)
that are supported by the index implementation.
|
java.lang.String |
getWhatToIndexString()
|
void |
indexDocument(IResource resource)
Puts a document into the index. |
void |
indexDocument(IResource resource,
IResourceEvent resourceEvent)
Puts a document into the index It is recommended that you do not index documents manually using this method. For repositories that send cm events, documents are indexed automatically when their content or their properties are changed. For repositories that do not support eventing, for example, Web repositories, a delta index crawler should be scheduled for the index folders that need to be updated. |
void |
indexDocuments(IResourceList resources)
Puts a list of documents into the index. |
void |
indexDocuments(IResourceList resources,
IResourceEvent resourceEvent)
Puts a list of documents into the index. |
boolean |
indexInternalLinks()
|
void |
init(java.util.Properties indexProperties)
Initializes the index with data that is specific for an index implementation The implementation is responsible for storing this data. This method is called before calling the generate() method.
|
boolean |
isActive()
|
int |
reduceNumberOfCrawler()
|
void |
reindex()
Clears the index (see clear() method) and starts putting all
documents into the index again It may be necessary to reindex an index if a CM repository that is assigned to the index now points to another underlying repository. |
void |
reindex(boolean disablePostClearTasks)
Clears the index (see clear() method) and starts putting all
documents into the index again It may be necessary to reindex an index may be needed if a CM repository that is assigned to the index now points to another underlying repository. |
void |
removeAllFolderUris()
Deprecated. as of NW04. Use clear() at the IIndexFolderList interface |
void |
removeFolderUri(URI folderUri)
Deprecated. as of NW04. Use remove(IIndexFolder) at the IIndexFolderList interface |
boolean |
setActive(boolean isActive)
|
void |
setActiveDuringStartup(boolean isActive)
|
void |
setCrawlerProfileId(java.lang.String crawlerProfileId)
Sets the ID of the default crawler profile for all index folders of the index. |
void |
setInactiveIndexHasChanged()
Sets a property on true, if index documents have changed during index was inactive. |
void |
setIndexGroup(java.lang.String indexGroup)
Assigns the index to a group of indexes that logically belong together. |
void |
setIndexingState(AbstractIndex.IndexingState state)
|
void |
setIndexName(java.lang.String indexName)
Non-technical identifier of an index. |
void |
setProperties(java.util.Properties indexProperties)
Saves index data that is specific for an index implementation The implementation is responsible for storing this data. Example: String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); Properties customProperties = new Properties(); customProperties.put("propertyXY","valueXY"); index.setProperties(customProperties); As an example of an index specific property, a TrexSearchIndex
has the property "fuzziness" that can have values from "0.0" to "1.0".This property is stored by the TrexSearchIndex class itself
because the property is not a generic index property. |
void |
setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTable)
Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable. |
void |
setStateAndNumberOfCrawler(AbstractIndex.IndexingState state,
int numOfCrawler)
|
void |
setWhatToIndex(java.lang.String whatToIndex)
|
boolean |
typeShouldBeIndexed(IResource resource)
|
| Method Detail |
public IPropertyMap getIndexedProperties()
throws WcmException
WcmException - Exception raised in failure situationpublic java.lang.String getIndexId()
IIndex object
from the IIndexService.Stringpublic java.lang.String getIndexName()
public void addFolderUri(URI folderUri)
folderUri - FolderUri to be addedpublic IUriList getFolderUris()
public IIndexFolderList getIndexFolders()
IIndexFolderList. If more than one superior folder
is attached to different indexes, the lower folder determines the index, in which
the document is stored.IIndexFolder objects that represent the attached folders of the indexpublic java.lang.String getServiceId()
com.sapportals.wcm.service.indexmanagement.retrieval.trex.TrexSearchAndClassificationIndexISearchIndex, IClassificationIndexStringpublic java.lang.String getIndexGroup()
group can be null.public java.util.List getServiceTypes()
StringIWcmIndexConst
starting with "SERVICE_TYPE_".public java.util.List getServiceTypes(java.util.Locale locale)
locale - locale in which the service type names have to be returnedString in the locale's languagepublic java.lang.String getCrawlerProfileId()
public void removeAllFolderUris()
public void removeFolderUri(URI folderUri)
folderUri - URI of the folder to remove from the indexpublic void setIndexName(java.lang.String indexName)
To save the new index name permanently, updateIndex(IIndex) must be called on the
IIndexService interface.
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
index.setIndexName("abc index");
indexService.updateIndex(index);
indexName - display name of the indexpublic void setIndexGroup(java.lang.String indexGroup)
To save the new index group permanently updateIndex(IIndex) must be called on the
IIndexService interface.
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
index.setIndexGroup("intranet");
indexService.updateIndex(index);
indexGroup - group the index has to been assigned to
public void setCrawlerProfileId(java.lang.String crawlerProfileId)
throws WcmException
CrawlerProfileId - The new CrawlerProfileId valueWcmException - if the operation fails
public void indexDocuments(IResourceList resources)
throws ResourceException,
WcmException,
java.io.IOException
resources - documents to index as IResourceListResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public void indexDocuments(IResourceList resources,
IResourceEvent resourceEvent)
throws ResourceException,
WcmException,
java.io.IOException
resources - documents to index as IResourceListresourceEvent - event that caused the index requestResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public void indexDocument(IResource resource)
throws ResourceException,
WcmException,
java.io.IOException
resource - document to indexResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public void indexDocument(IResource resource,
IResourceEvent resourceEvent)
throws ResourceException,
WcmException,
java.io.IOException
resource - document to indexResourceException - exception raised in failure situationWcmException - exception raised in failure situationjava.io.IOException - exception raised in failure situation
public void deindexDocuments(IResourceList resources)
throws WcmException,
ResourceException
resources - documents to remove from the indexWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void deindexDocuments(IUriList uris)
throws WcmException,
ResourceException
uris - list of URI objectsWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void deindexDocuments(IRidList rids)
throws WcmException,
ResourceException
rids - resource IDs to remove from the index
where every RID represents a documentWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void deindexDocument(IResource resource)
throws WcmException,
ResourceException
resource - document to remove from the indexWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void deindexDocument(URI uri)
throws WcmException,
ResourceException
uri - URI to deindexWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void deindexDocument(RID rid)
throws WcmException,
ResourceException
rid - resource ID as reference to a document to remove from the indexWcmException - exception raised in failure situationResourceException - exception raised in failure situation
public void delete()
throws WcmException
deleted(IResourceContext)
deleteIndex(IIndex)
method of the IIndexService interface should be used
instead of this. It deletes the index on cm side after internally calling this
delete() method of the index to delete the index physically.
Example:
String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); indexService.deleteIndex(index);
WcmException - exception raised in failure situationIndexDoesNotExistOnServerException - raised if the index could not
be deleted physically because it does not exist any more but could successfully
be deleted on CM side.
public void delete(IResourceContext context)
throws WcmException
deleteIndex(IIndex)
method of the IIndexService interface should be used
instead of this. It deletes the index on cm side after internally calling this
delete() method of the index to delete the index physically.
Example:
String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); indexService.deleteIndex(index);
context - user contextWcmException - exception raised in failure situationIndexDoesNotExistOnServerException - raised if the index could not
be deleted physically because it does not exist any more but could be successfully
deleted on CM side.
public void clear()
throws WcmException
reindex() method does exactly this. It first calls the
clear() method to initialize the index and then starts
indexing all index folders that are attached to the index.WcmException - exception raised in failure situation
public void deleteOnServer()
throws WcmException
WcmException -
public void createIndexOnServer()
throws WcmException
WcmException - public void init(java.util.Properties indexProperties)
generate() method.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
Properties customProperties = new Properties();
customProperties.put("propertyXY","valueXY");
index.init(customProperties);
index.generate();
As an example of an index specific property, a TrexSearchIndex
has the property "fuzziness" that can have values from "0.0" to "1.0".TrexSearchIndex class itself
because the property is not a generic index property.indexProperties - property bag that contains index implementation specific propertiespublic void setProperties(java.util.Properties indexProperties)
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
Properties customProperties = new Properties();
customProperties.put("propertyXY","valueXY");
index.setProperties(customProperties);
As an example of an index specific property, a TrexSearchIndex
has the property "fuzziness" that can have values from "0.0" to "1.0".TrexSearchIndex class itself
because the property is not a generic index property.indexProperties - property bag that contains index implementation specific propertiespublic java.util.Properties getProperties()
setProperties.
public void checkProperties(java.util.Properties customProperties)
throws WcmException
customProperties - WcmException -
public void generate()
throws WcmException
generate(IResourceContext)
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
Properties customProperties = new Properties();
customProperties.put("propertyXY","valueXY");
index.init(customProperties);
index.generate();
WcmException - exception raised in failure situation
public void generate(IResourceContext context)
throws WcmException
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.createIndex(indexId, indexName, indexGroup, serviceId);
Properties customProperties = new Properties();
customProperties.put("propertyXY","valueXY");
index.init(customProperties);
index.generate();
context - user contextWcmException - exception raised in failure situation
public void reindex()
throws WcmException
clear() method) and starts putting all
documents into the index again WcmException - exception raised in failure situation
public void reindex(boolean disablePostClearTasks)
throws WcmException
clear() method) and starts putting all
documents into the index again disablePostClearTasks - if true, the tasks that can be performed by
the index implementation after the index has been cleared are skipped.WcmException - exception raised in failure situation
public void deltaReindex()
throws WcmException
reindex method, this call does not clear the index.WcmException - exception raised in failure situationpublic ISupportedOptionSet getSupportedOptions()
ISearchIndex, IClassificationIndex)
that are supported by the index implementation.
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
ISupportedOptionSet supportedOptions = index.getSupportedOptions();
if (supportedOptions.isSupported(SupportedOption.SEARCH)) {
//do search; it is supported by the index
}
SupportedOption
public java.util.List getLanguagesOfIndexedDocuments()
throws WcmException
public IIndexFolder getIndexFolderForDocument(RID documentRid)
null is returned.documentRid - resource ID of the document to get the index folder for
public java.lang.String getResourceInfo(IResource resource)
throws ResourceException
resource is null.resource - resource to investigateResourceException - exception raised in failure situation
public void setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTable)
throws WcmException
ISchedulerTimeTable. Thereby it sets this schedule for all
data sources with no own schedule.
Remark: It is recommended to use the similar method of the
IIndexService instead of this method.schedulerTimeTablePar - ISchedulerTimeTableWcmException - in case of an error.
public ISchedulerTimeTable getSchedulerTimeTable()
throws WcmException
IIndexService instead of this method.ISchedulerTimeTableWcmException - in case of an error.public boolean isActive()
public boolean setActive(boolean isActive)
throws WcmException
public void setActiveDuringStartup(boolean isActive)
throws WcmException
public void setInactiveIndexHasChanged()
throws WcmException,
ResourceException
WcmException - in case of an errorResourceException - in case of an error
public RID getRID()
throws WcmException
WcmException - in case of an error.
public void setStateAndNumberOfCrawler(AbstractIndex.IndexingState state,
int numOfCrawler)
throws WcmException
public void setIndexingState(AbstractIndex.IndexingState state)
throws WcmException
public AbstractIndex.IndexingState getIndexingState()
throws WcmException
public int reduceNumberOfCrawler()
throws WcmException
public boolean typeShouldBeIndexed(IResource resource)
resource - public java.lang.String getWhatToIndexString()
public void setWhatToIndex(java.lang.String whatToIndex)
whatToIndex - public boolean indexInternalLinks()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||