If the title didn’t make sense, what I’m looking for is something similar to what you get using google. Instead of displaying a part of the post that has nothing to do with the keywords used in the search (such as the excerpt or entire post), is it possible to somehow extract the the part of the results containing the keyword match(es) and display that.
Example:
Search for “quam egestas”.
Result: “...Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo…”