Note that searches in text files for Samurai Search are line based. Encountering lines that exceed a maximum length (over 10k characters) will result in a warning message (because a pattern may fail to match due to the splitting at the maximum length boundary).
Searches in PDF files are page based. Searches may match across lines in a page, in which case the results will show the matching lines. Note that searching in PDF is inherently difficult because of the complex ways in which characters can be rendered on the page.