Steps:
1. Add custom pattern (via IndexPatternProvider implementation), for example
author\s+(\S+)
2. Try to search by this pattern in file contaninig code fragment
/**
* @author yole
*/
Expression "(IndexPatternSearch.getOccurrencesCount(file, pattern) > 0)" will be true, but
"IndexPatternSearch.search(file, codeLinkType).findAll()" will return empty collection
For comment
/*
* @author yole
*/
same collection will contain single element.