SAP NetWeaver '04

com.sapportals.wcm.service.indexmanagement.retrieval.search
Interface ISearchIndexCollection

[contained in: com.sap.km.cm.service.par - km.shared.service.indexmanagement_api.jar]
All Superinterfaces:
java.util.Collection
All Known Implementing Classes:
AbstractSearchIndexCollection

public interface ISearchIndexCollection
extends java.util.Collection

Offers search calls for more than one index.


Field Summary
static int DEFAULT_INIT_MAX_RAW_RESULTS
          Search with session: default maximum number of raw results for the initial search The number is increased automatically when the result session requests more raw results.
 
Method Summary
 void addIndex(IIndex index)
          Adds an index to the index collection
 ISearchResultList executeQuery(IQueryEntryList queryEntryList, IResourceContext context, int maxResults)
          Executes the search
 ISearchResultList executeQuery(IQueryEntryList queryEntryList, IResourceContext context, int maxResults, ICollection searchFromHere)
          Executes the search
 ISearchResultList executeQuery(IQueryEntryList queryEntryList, IResourceContext context, int maxResults, ICollection searchFromHere, java.util.Set languages)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, ICollection searchFromHere)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, int initNumberMaxRawResults)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, int initNumberMaxRawResults, ICollection searchFromHere)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, int initNumberMaxRawResults, ICollection searchFromHere, ISortPropertyName sortProperty)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, int initNumberMaxRawResults, ICollection searchFromHere, ISortPropertyName sortProperty, java.util.Set languages)
          Executes the search
 ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList, IResourceContext context, int initNumberMaxRawResults, IRidList searchFromHereList, ISortPropertyName sortProperty, java.util.Set languages)
          Executes the search
 int getMaxSnippetWords()
          Sets the number of snippet words returned for documents in a search.
 IQueryEntry getNewQueryEntry()
           
 IQueryEntryList getNewQueryEntryList()
           
 IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context)
          Returns basic information about the distribution of the properties of the indexes, of the SearchIndexCollection only considering the documents fullfilling the search restriction.
 IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, java.util.Collection indexList)
          Returns basic information about the distribution of the properties of the indexes, only considering the documents fullfilling the search restriction.
 IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, ISearchIndex index)
          Returns basic information about the distribution of the properties of an index, only considering the documents fullfilling the search restriction.
 IPropertyRangeList getPropertyRanges(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context)
          Returns the ranges of the properties of the indexes of the ISearchIndexCollection, only considering the documents fullfilling the search restriction.
 IPropertyRangeList getPropertyRanges(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, java.util.Collection indexList)
          Returns the ranges of the properties of the indexes, only considering the documents fullfilling the search restriction.
 IPropertyRangeList getPropertyRanges(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, ISearchIndex index)
          Returns the ranges of the properties of an index, only considering the documents fullfilling the search restriction.
 java.util.Collection getPropertyValues(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context)
          Returns the distinct property values of all indexes of the ISearchIndexCollection for the specified property, only considering the documents fullfilling the search restriction.
 java.util.Collection getPropertyValues(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, java.util.Collection indexes)
          Returns the distinct property values of the indexes for the specified property, only considering the documents fullfilling the search restriction.
 java.util.Collection getPropertyValues(IPropertyName propertyName, IQueryEntryList queryEntryList, ICollection searchFromHere, IResourceContext context, ISearchIndex index)
          Returns the distinct property values of an index, only considering the documents fullfilling the search restriction.
 java.lang.String getQueryAsString()
          Deprecated. as of NW04.
 ISearchResultList getSearchResults(java.util.List rawSearchResults, IResourceContext context)
           
 void loadQuery(java.util.Properties props)
          Deprecated. as of NW04.
 ISearchResultList searchSimilarDocuments(IResourceList searchDocuments, int maxResults)
          searches similar documents
 ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments)
          searches similar documents
 ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments, int initNumberMaxRawResults)
          searches similar documents
 ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments, int initNumberMaxRawResults, ISortPropertyName sortProperty)
          searches similar documents
 java.util.Collection searchSimilarTerms(java.util.Collection terms, int maxTerms)
          searches similar terms to a collection of terms
 void setMaxSnippetWords(int numOfWords)
          Sets the number of snippet words returned for documents in a search.
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Field Detail

DEFAULT_INIT_MAX_RAW_RESULTS

public static final int DEFAULT_INIT_MAX_RAW_RESULTS
Search with session: default maximum number of raw results for the initial search The number is increased automatically when the result session requests more raw results.
Method Detail

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
Returns:
search session result

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              int initNumberMaxRawResults)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
initNumberResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
Returns:
search session result

executeQuery

public ISearchResultList executeQuery(IQueryEntryList queryEntryList,
                                      IResourceContext context,
                                      int maxResults)
                               throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
maxResults - - maximum number of search results
Returns:
search result list with the found documents

executeQuery

public ISearchResultList executeQuery(IQueryEntryList queryEntryList,
                                      IResourceContext context,
                                      int maxResults,
                                      ICollection searchFromHere)
                               throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
maxResults - - maximum number of search results
searchFromHere - - folder from where search results must be direct or indirect children
Returns:
search result list with the found documents

executeQuery

public ISearchResultList executeQuery(IQueryEntryList queryEntryList,
                                      IResourceContext context,
                                      int maxResults,
                                      ICollection searchFromHere,
                                      java.util.Set languages)
                               throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
maxResults - - maximum number of search results
searchFromHere - - folder from where search results must be direct or indirect children
languages - - set of strings, representing languages on which the search is restricted
Returns:
search result list with the found documents

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              ICollection searchFromHere)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
searchFromHere - - folder from where search results must be direct or indirect children
Returns:
search session result

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              int initNumberMaxRawResults,
                                              ICollection searchFromHere)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
searchFromHere - - folder from where search results must be direct or indirect children
Returns:
search session result

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              int initNumberMaxRawResults,
                                              ICollection searchFromHere,
                                              ISortPropertyName sortProperty)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
searchFromHere - - folder from where search results must be direct or indirect children
sortProperty - property name for sorting the results
Returns:
search session result

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              int initNumberMaxRawResults,
                                              ICollection searchFromHere,
                                              ISortPropertyName sortProperty,
                                              java.util.Set languages)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
searchFromHere - - folder from where search results must be direct or indirect children
languages - - restricts the search on the languages contained (as strings)
sortProperty - property name for sorting the results
Returns:
search session result

executeQueryWithSession

public ISearchSession executeQueryWithSession(IQueryEntryList queryEntryList,
                                              IResourceContext context,
                                              int initNumberMaxRawResults,
                                              IRidList searchFromHereList,
                                              ISortPropertyName sortProperty,
                                              java.util.Set languages)
                                       throws WcmException
Executes the search
Parameters:
queryEntryList - - list of query entries for the search
context - - user context
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
searchFromHereList - - folder with ICollections from where search results must be a direct or indirect children
languages - - restricts the search on the languages contained (as strings)
sortProperty - property name for sorting the results
Returns:
search session result

searchSimilarDocuments

public ISearchResultList searchSimilarDocuments(IResourceList searchDocuments,
                                                int maxResults)
                                         throws WcmException
searches similar documents
Parameters:
searchDocuments - - list of documents for that similar documents have to be found
maxResults - - maximum number of similar documents
Returns:
search result list with the found similar documents

searchSimilarDocumentsWithSession

public ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments)
                                                 throws WcmException
searches similar documents
Parameters:
searchDocuments - - list of documents for that similar documents have to be found
Returns:
search session result

searchSimilarDocumentsWithSession

public ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments,
                                                        int initNumberMaxRawResults)
                                                 throws WcmException
searches similar documents
Parameters:
searchDocuments - - list of documents for that similar documents have to be found
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
Returns:
search session result

searchSimilarDocumentsWithSession

public ISearchSession searchSimilarDocumentsWithSession(IResourceList searchDocuments,
                                                        int initNumberMaxRawResults,
                                                        ISortPropertyName sortProperty)
                                                 throws WcmException
searches similar documents
Parameters:
searchDocuments - - list of documents for that similar documents have to be found
initNumberMaxRawResults - initial maximum number of raw results. The number is increased automatically when the result session requests more raw results.
sortProperty - property name for sorting the results
Returns:
search session result

searchSimilarTerms

public java.util.Collection searchSimilarTerms(java.util.Collection terms,
                                               int maxTerms)
                                        throws WcmException
searches similar terms to a collection of terms
Parameters:
terms - Collection of terms (Strings)
maxTerms - - maximum number of returned similar terms
Returns:
Collection of ITextminingTerm

getQueryAsString

public java.lang.String getQueryAsString()
                                  throws WcmException
Deprecated. as of NW04.

Returns the momentary query as a string, ready to be saved as a .properties file

loadQuery

public void loadQuery(java.util.Properties props)
               throws WcmException
Deprecated. as of NW04.

loads a complete Query from the given properites object.

getNewQueryEntry

public IQueryEntry getNewQueryEntry()
Returns:
a new query entry instance

getNewQueryEntryList

public IQueryEntryList getNewQueryEntryList()
Returns:
a new query entry list instance

addIndex

public void addIndex(IIndex index)
              throws WcmException
Adds an index to the index collection
Parameters:
index - - index that is added to the collection

getSearchResults

public ISearchResultList getSearchResults(java.util.List rawSearchResults,
                                          IResourceContext context)
                                   throws ResourceException
Parameters:
rawSearchResults - list of IRawSearchResult
Returns:
list of search results

getPropertyDistributionOverview

public IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList,
                                                                 ICollection searchFromHere,
                                                                 IResourceContext context,
                                                                 ISearchIndex index)
                                                          throws WcmException
Returns basic information about the distribution of the properties of an index, only considering the documents fullfilling the search restriction.
Parameters:
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexID -  
Returns:
list of search results
Throws:
ResourceException - in case of an error

getPropertyDistributionOverview

public IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList,
                                                                 ICollection searchFromHere,
                                                                 IResourceContext context,
                                                                 java.util.Collection indexList)
                                                          throws WcmException
Returns basic information about the distribution of the properties of the indexes, only considering the documents fullfilling the search restriction.
Parameters:
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexList - list of ISearchIndex of one type, e.g. AbstractTrexSearchIndex
Returns:
list of search results
Throws:
ResourceException - in case of an error

getPropertyDistributionOverview

public IPropertyDistributionList getPropertyDistributionOverview(IQueryEntryList queryEntryList,
                                                                 ICollection searchFromHere,
                                                                 IResourceContext context)
                                                          throws WcmException
Returns basic information about the distribution of the properties of the indexes, of the SearchIndexCollection only considering the documents fullfilling the search restriction.
Parameters:
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexList - list of ISearchIndex of one type, e.g. AbstractTrexSearchIndex
Throws:
ResourceException - in case of an error

getPropertyRanges

public IPropertyRangeList getPropertyRanges(IPropertyName propertyName,
                                            IQueryEntryList queryEntryList,
                                            ICollection searchFromHere,
                                            IResourceContext context,
                                            ISearchIndex index)
                                     throws WcmException
Returns the ranges of the properties of an index, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the ranges are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
index -  
Returns:
list of search results
Throws:
WcmException - in case of an error

getPropertyRanges

public IPropertyRangeList getPropertyRanges(IPropertyName propertyName,
                                            IQueryEntryList queryEntryList,
                                            ICollection searchFromHere,
                                            IResourceContext context,
                                            java.util.Collection indexList)
                                     throws WcmException
Returns the ranges of the properties of the indexes, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the ranges are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexList -  
Returns:
list of search results
Throws:
WcmException - in case of an error

getPropertyRanges

public IPropertyRangeList getPropertyRanges(IPropertyName propertyName,
                                            IQueryEntryList queryEntryList,
                                            ICollection searchFromHere,
                                            IResourceContext context)
                                     throws WcmException
Returns the ranges of the properties of the indexes of the ISearchIndexCollection, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the ranges are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexList -  
Returns:
list of search results
Throws:
WcmException - in case of an error

getPropertyValues

public java.util.Collection getPropertyValues(IPropertyName propertyName,
                                              IQueryEntryList queryEntryList,
                                              ICollection searchFromHere,
                                              IResourceContext context,
                                              ISearchIndex index)
                                       throws WcmException
Returns the distinct property values of an index, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the values are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
index -  
Returns:
list of IProperty objects
Throws:
WcmException - in case of an error

getPropertyValues

public java.util.Collection getPropertyValues(IPropertyName propertyName,
                                              IQueryEntryList queryEntryList,
                                              ICollection searchFromHere,
                                              IResourceContext context,
                                              java.util.Collection indexes)
                                       throws WcmException
Returns the distinct property values of the indexes for the specified property, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the values are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexes -  
Returns:
list of IProperty objects
Throws:
WcmException - in case of an error

getPropertyValues

public java.util.Collection getPropertyValues(IPropertyName propertyName,
                                              IQueryEntryList queryEntryList,
                                              ICollection searchFromHere,
                                              IResourceContext context)
                                       throws WcmException
Returns the distinct property values of all indexes of the ISearchIndexCollection for the specified property, only considering the documents fullfilling the search restriction.
Parameters:
propertyName - the property for which the values are extracted
queryEntryList - restricts the considered documents to those fullfilling this expression
searchFromHere - restricts the considered documents to those located under this collection
context - resource context, not used to filter the result applying the access rights to the documents.
indexes -  
Returns:
list of IProperty objects
Throws:
WcmException - in case of an error

setMaxSnippetWords

public void setMaxSnippetWords(int numOfWords)
Sets the number of snippet words returned for documents in a search. If not set, a default value is used.
Parameters:
numOfWords -  

getMaxSnippetWords

public int getMaxSnippetWords()
Sets the number of snippet words returned for documents in a search.
Returns:
number of snippet words

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.