use of org.entando.entando.aps.system.services.dataobjectsearchengine.SearchEngineManager in project entando-core by entando.
the class TestSearchEngineManager method testSearchAllContents.
public void testSearchAllContents() throws Throwable {
try {
Thread thread = this.dataObjectSearchEngineManager.startReloadDataObjectsReferences();
thread.join();
Set<String> allowedGroup = new HashSet<String>();
SearchEngineFilter[] filters = {};
SearchEngineManager sem = (SearchEngineManager) this.dataObjectSearchEngineManager;
List<String> freeContentsId = sem.searchEntityId(filters, null, allowedGroup);
assertNotNull(freeContentsId);
allowedGroup.add(Group.ADMINS_GROUP_NAME);
List<String> allContentsId = sem.searchEntityId(filters, null, allowedGroup);
assertNotNull(allContentsId);
assertTrue(allContentsId.size() > freeContentsId.size());
} catch (Throwable t) {
throw t;
}
}
use of org.entando.entando.aps.system.services.dataobjectsearchengine.SearchEngineManager in project entando-core by entando.
the class TestSearchEngineManager method testFacetedAllContents.
public void testFacetedAllContents() throws Throwable {
try {
Thread thread = this.dataObjectSearchEngineManager.startReloadDataObjectsReferences();
thread.join();
SearchEngineManager sem = (SearchEngineManager) this.dataObjectSearchEngineManager;
Set<String> allowedGroup = new HashSet<String>();
allowedGroup.add(Group.ADMINS_GROUP_NAME);
SearchEngineFilter[] filters = {};
FacetedContentsResult result = sem.searchFacetedEntities(filters, null, allowedGroup);
assertNotNull(result);
assertNotNull(result.getContentsId());
assertNotNull(result.getOccurrences());
assertTrue(result.getContentsId().size() > 0);
assertTrue(result.getOccurrences().size() > 0);
} catch (Throwable t) {
throw t;
}
}
Aggregations