11-14-2016 08:59 AM
Hello,
Could someone explain if there is any difference between the listSites and findSites methods in SiteService when I want to list ALL sites:
List<SiteInfo> listSites = this.siteService.listSites(null, null);
List<SiteInfo> findSites = this.siteService.findSites("*", 0);
Is it possible findSites not to return sometimes all sites?
I used that method but when I created a new Site programatically before calling that method, it doesn't find it at all.
Is it possible the result between listSites and findSites to be different in the above example?
Thank you in advance.
11-14-2016 09:39 AM
The main difference is in how the filter is applied. listSites only supports retrieving sites where the name / title starts with a specific value where as findSites supports a any-match use case. listSites is designed to make use of DB-based lookups whereas findSites may use index-based queries. This would explain the behaviour you are seeing - since SOLR indexing is asynchronous you may not immediately find a newly created site via findSites.
11-14-2016 09:39 AM
The main difference is in how the filter is applied. listSites only supports retrieving sites where the name / title starts with a specific value where as findSites supports a any-match use case. listSites is designed to make use of DB-based lookups whereas findSites may use index-based queries. This would explain the behaviour you are seeing - since SOLR indexing is asynchronous you may not immediately find a newly created site via findSites.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.