nqxcode / laravel-lucene-search

Laravel 4.2, 5.* package for full-text search over Eloquent models based on ZF2 Lucene.
73 stars 28 forks source link

Missing doc about custom primary_key #33

Closed anolek closed 7 years ago

anolek commented 8 years ago

Hi,

I have a Model with a custom primaryKey and found that my documents are not indexing properly.

protected $primaryKey = 'my_custom_field_name';

After looking in the code, i found a config about it, but nothing in the documentation mention it.

    'models' => [
         App\Models\MyModel::class => [
            // Hidden feature !
            'primary_key' => 'my_custom_field_name',

Could you please add it ? :)

Thanks !