nicolaslopezj / searchable

A php trait to search laravel models
MIT License
2.01k stars 291 forks source link

What does it means? #100

Open essivision opened 8 years ago

essivision commented 8 years ago

Hi What does it means number in eloquent example? protected $searchable = [`

   use Nicolaslopezj\Searchable\SearchableTrait;

class User extends \Eloquent { use SearchableTrait;

protected $searchable = [
    'columns' => [
        'first_name' => 10,
        'last_name' => 10,
        'bio' => 2,
        'email' => 5,
    ],
];

} `

cwolfenberger commented 8 years ago

That's to set the priority or relevance rating of those specific columns in your search results.. It's pretty clear in the readme/documentation.

essivision commented 8 years ago

+1

doncadavona commented 8 years ago

I don't agree that it is clear in the documentation.

It's vague. I don't get what 10, 10, 2, 5, 2 and 1 means for the column values of first_name, last_name and so fort. As this issue #122.

Please make it clearer.