We're using claims and securing site collections using the claims in SP2013. Security-wise, everything works as expected. We crawl the content and it appears the sites are in the index. We issue a keyword query and no results are returned even though the identity contains the claims (and can access) site collections. we're doing custom claims augmentation. Single zone. we're using NTLM and don't seeing any errors, access denied, or anything for the query processor in ULS. Note that results are returned only when searching using system account.
We discovered that it was an issue with the separator used in the compound claims. We were using
| (pipe) as the field separator. The claim was something like
contoso|user|1234 The suspicion is on the content side, the encoded value for the pipe was stored (as evidenced in examining the claim values in the permissions) but during crawl/gatherer/processing an un-encoded value is used during permission evaluation which always resulted in trimming. This is further evidenced by testing by using different delimiters like
_ which do not change during encoding.