Skip to Content

Search iView for Knowledge Management

SDN Behind The Scenes - How We Developed A New Search Interface:


I have two problems with the code-example (see the link for the code above) for a new search-iview.

1. Problem:

I created the search-iview with the same code from the example and it runs in the same way like the example on SAP Developer Network excepted the search with the wildcard "*".

By this search I only get a blank site.

2. Problem:

I want to expand the functionality of the search: The search should return documents, with an until yet not readed by the user. (property meta data: readbyme = false)

I added code between the to lines to the original code (see below).

After testing the code, the search result doesn´t work in wanted way.

Can somebody help me to realise an expanded search after certain document properties?

Best regards,

Arnold Gallemann

private ISearchResultList performSearch(String searchString, String indexId, int maxRecordsReturned) throws ResourceException, WcmException{

//Get the resource context

IResourceContext resourceContext = (IResourceContext)new ResourceContext(this.loggedOnUser);

//Get the global service IIndexService

IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);

//Get an IIndex object

IIndex index = indexService.getIndex(indexId);

//Cast the IIndex object into a ISearchIndex object

ISearchIndex searchIndex = (ISearchIndex)index;

//Get and IQueryEntryList object

IQueryEntryList queryEntryList = searchIndex.getNewQueryEntryList();

//Get an IQueryEntry object

IQueryEntry queryEntry = searchIndex.getNewQueryEntry();

//Set the row type


//Set the TermAction


//Set the Term weight


//Set the query string




//Added source code:

//Set Property Meta Data readbyme


IPropertyName glesen = (IPropertyName)new PropertyName("", "readbyme");







//Add the queryEntry to the queryEntryList


//Execute the query

ISearchResultList results = searchIndex.executeQuery(queryEntryList, resourceContext, 100);

return results;


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Posted on Aug 06, 2004 at 01:05 PM

    Hi Arnold,

    ad 1) * Search means that all documents from the selected indexes are returned. Please check in the TREX Monitor, how many documents are already indexed.

    ad 2) To add an IPropertyName to a specifix search you have to create an TREX conmpliant IQueryList object. This can be done manually by adding the correct sequence of IQueryEntry objects to the list. Or more simple: Just use the SearchQueryBuilder class to generate and validate a TREX compliant query object: sb = new SearchQueryBuilder();





    IQueryEntryList list = sb.buildSearchQueryEntry();

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Thilo,

      we have found a not comprehensibly behavior in different Search iViews in the portal on the same index:

      If we search with the wildcard "", one iView shows all documents from the index. The other iView found no document. It only works with an additional letter (e. g. searchstring "t" returns all documents starting with a "t").

      Do you have an advice for these different behavior of the two iViews on the same portal?

      Best regards,