Thanks for your help, but let me clarify what I am asking.
We are utilizing the Community/Search/Messages api to get back a list of search results. When someone searches on the website and click on a link, it not only takes them to a linear version of the thread, but it also directs them to the correct page of the thread in order to view the message that matched their search results.
We are attempting to replicate this functionality within a tool on an internal system. Ideally, when a user clicks on one of the search results, they are directed to a page that renders a linear view of the thread and brings them directly to the page they need to be on to view the message that matched their search. As far as I can tell, there is no programmatic way to determine which number a message is in the linear view of a thread. That is what we need.