Not All Site Collections show up in the results - Sharepoint 2013 Search through CSOM
<p>I am working on a C# code that retrieves all site collection paths from a On-Premise Sharepoint 2013 server. I have the following Site Collections on the server:</p>

<p>/serverurl/<br/>
/serverurl/my<br/>
/serverurl/my/personal/site1<br/>
/serverurl/my/personal/site2<br/>
/serverurl/sites/TestSite<br/>
/serverurl/custompath/site3<br/></p>

<p>when I run my code , I only get the following site collections:<br />
/serverurl/<br/>
/serverurl/my<br/>
/serverurl/my/personal/site1<br/>
/serverurl/my/personal/site2<br/>
I was wondering why my search does not return all the site collections?<br />
here is my code:<br /></p>

<pre><code>ClientContext context = new ClientContext(siteUrl);
var cred = new NetworkCredential(userName, password, domain);
context.Credentials = cred;
KeywordQuery query = new KeywordQuery(context);
query.QueryText = "contentclass:STS_Site";
SearchExecutor executor = new SearchExecutor(context);
query.TrimDuplicates = true;
var resultTable = executor.ExecuteQuery(query);
context.ExecuteQuery();
foreach (var row in resultTable.Value[0].ResultRows)
{
   string siteName = row["siteName"] as string;
   Console.WriteLine("Site Name: {0}", siteName);
}
</code></pre>

<p>Thanks!</p>