django-watson icon indicating copy to clipboard operation
django-watson copied to clipboard

support extra fields to be indexed

Open valentijnscholten opened this issue 3 years ago • 1 comments

By defauilt all CharFields and TextFields are indexed.

You can exclude some on registration by using exclude.

Alternatively you can specify the fields that you want to have indexed, and watson will only index these fields.

I would like the possibility to keep indexing all CharFields and TextFields, but allow for extra fields to be specified on registration. For example sometimes you want to index one extra field or one field from a related model, i.e. 'parent__name'.

Currently you would have to manually list all the fields of model and then add the parent__name to the list and use this combined list at registration. There may be work around to hassle with the django meta internals, but it would be nicer to just be able to provide somthings 'extra_fields=()' on registration.

valentijnscholten avatar Sep 12 '20 11:09 valentijnscholten

That sounds useful enough for a MR.

On Sat, 12 Sep 2020 at 12:47, valentijnscholten [email protected] wrote:

By defauilt all CharFields and TextFields are indexed.

You can exclude some on registration by using exclude.

Alternatively you can specify the fields that you want to have indexed, and watson will only index these fields.

I would like the possibility to keep indexing all CharFields and TextFields, but allow for extra fields to be specified on registration. For example sometimes you want to index one extra field or one field from a related model, i.e. 'parent__name'.

Currently you would have to manually list all the fields of model and then add the parent__name to the list and use this combined list at registration. There may be work around to hassle with the django meta internals, but it would be nicer to just be able to provide somthings 'extra_fields=()' on registration.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/etianen/django-watson/issues/278, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEKCETJZSIHU2COE377G3SFNNVZANCNFSM4RJNN2DQ .

etianen avatar Sep 15 '20 08:09 etianen