queryManager.createQuery(query, Query.XWQL)
.bindValue("keywords", String.format("%%%s%%", keywords.toUpperCase())).setLimit(number)
.setOffset(start).execute();
for (Object object : queryResult) {
String spaceName = (String) object;
<BUG>Document spaceDoc = Utils.getXWikiApi(componentManager).getDocument(spaceName + ".WebHome");
if (Utils.getXWikiApi(componentManager).hasAccessLevel("view", spaceDoc.getPrefixedFullName())) {
</BUG>
String title = spaceDoc.getDisplayTitle();
SearchResult searchResult = objectFactory.createSearchResult();

queryManager.createQuery(query, Query.XWQL)
.bindValue("keywords", String.format("%%%s%%", keywords.toUpperCase())).setLimit(number)
.setOffset(start).execute();
for (Object object : queryResult) {
String spaceName = (String) object;
Document spaceDoc = xwikiApi.getDocument(String.format("%s.WebHome", spaceName));
if (xwikiApi.hasAccessLevel("view", spaceDoc.getPrefixedFullName())) {
String title = spaceDoc.getDisplayTitle();
SearchResult searchResult = objectFactory.createSearchResult();
