Search code examples
laravellaravel-scout

Identify matching key in Laravel Scout


I'm using Laravel Scout with TNTSearch. Is there any way to ascertain which fields (array keys on the toSearchableArray() method) have been matched when a result is returned by the search method?


Solution

  • Since TNTSearch is field agnostic it isn't possible to know which field was matched.