mercredi 5 juin 2019

How to orderby and combine types of the same index in laravel search when using scount with elasticsearch?

I have a Laravel application. I installed elasticsearch server and implemented it to laravel using scout and tamayo/laravel-scout-elastic.

All is working almost perfectly. I have two questions that I can't find the answer to.

  1. How to order the output of the results by most words matching. Or _score of the elastic results

  2. How to combine two types of the same index? I have index by the name of news how to combine world news and sports news?

I am using this method to make the search:

$searched = Model::search($q)->get();

In the model I've included the Scout

use Laravel\Scout\Searchable; and use Searchable;



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2MytpD0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire