laravel-scout-tntsearch-driver
laravel-scout-tntsearch-driver copied to clipboard
Searching multiple models
I've not been able to find any tutorial or guide that shows how to search multiple models together, with a query. In my application, I've a 'Thread' model and a 'Reply' model. When a user performs search, I need to search $thread->title
, $thread->body
and $reply->body
.
But then, I need to rank the results with relevance starting with the title, thread body and then reply-body.
Would really appreciate if someone could give me a pointer in the right direction. Have already scratched my head a lot on this.