laravel-scout-tntsearch-driver icon indicating copy to clipboard operation
laravel-scout-tntsearch-driver copied to clipboard

Searching multiple models

Open TheBigK opened this issue 6 years ago • 1 comments

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.

TheBigK avatar Mar 13 '18 12:03 TheBigK

See this

the94air avatar Mar 13 '18 19:03 the94air