teamtnt / laravel-scout-tntsearch-driver

Driver for Laravel Scout search package based on https://github.com/teamtnt/tntsearch
MIT License
1.09k stars 142 forks source link

Add possibility to order different model searches by score #344

Closed it4need closed 1 year ago

it4need commented 2 years ago

In order to make sure, that https://github.com/teamtnt/tntsearch/issues/55 will be possible, I created a PR on the tntSearch repo https://github.com/teamtnt/tntsearch/pull/273. To complete the cycle, it'd be nice to be able to add tntSearchScore into the models attributes, to be able to order multiple models by their scores.

Will also affect

https://github.com/teamtnt/laravel-scout-tntsearch-driver/issues/222

it4need commented 1 year ago

@nticaric Just for your information: teamtnt has released the changes which I provided in the repo with this release: https://github.com/teamtnt/tntsearch/releases/tag/v3.0.0

So it would be glad, if you could also merge it and make a new release for these changes to make possible that searches over different models can be sortable by score.

stokic commented 1 year ago

this is a good idea but it shouldn't be forced ie. this field should be added only if you want it. Currently it'll alway be added which is not optimal imo

nticaric commented 1 year ago

@it4need can you please take a look at this?

soloincc commented 3 months ago

Bump