AnsweredAssumed Answered

Keyword search succeeds through UI, fails via WS Search API

Question asked by aspa on Aug 17, 2007
I'm having problems getting WS Search API to retrieve content items that are found using the Web client with the same user.

When I execute a search through the Web client with keyword string 'someco' while logged on as 'foo' I get 6 hits. When I execute a search using the WS Search API I get no hits with user 'foo'. Same thing with admin user. The content items include both cm:content and custom types.

Keyword search with strings 'tutorial' and 'alfresco' return the same amount of hits through the UI and WS API.

Any ideas on why I'm not getting any results with the 'someco' query using WS API?

The code looks like this:

AuthenticationUtils.startSession("admin", "admin");
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
String queryString = "TEXT:'someco'";
Query query = new Query(Constants.QUERY_LANG_LUCENE, queryString);
Store store = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
QueryResult queryResult = repositoryService.query(store, query, false);