Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per user or profile results #253

Closed
n3storm opened this issue Dec 19, 2018 · 5 comments
Closed

Per user or profile results #253

n3storm opened this issue Dec 19, 2018 · 5 comments

Comments

@n3storm
Copy link

n3storm commented Dec 19, 2018

I need to index and search a lot of documents. Documents are used by different organizations than can only access a subset of the whole lot.

Access is determined by groups in a tree like structure. Tree is finite.

Is it crazy or dumb or impossible the following?:

Create a proxy model per tree node to filter documents accordingly to access permission and register to django-watson those proxy models.

Thanks in advance and any other approach that doesnt't include "filtering on view" will be welcomed.

@etianen
Copy link
Owner

etianen commented Dec 19, 2018 via email

@n3storm
Copy link
Author

n3storm commented Dec 20, 2018

There where less than 120 proxies (done programatically of course).

You are probably are right but I found this solution for Django Haystak:
https://stackoverflow.com/questions/28561054/django-haystack-create-multiple-indexes-for-the-same-model

How about to make 17 proxies? only for one level and second level fathers? and then filter from there on the view. That will filter out a lot and queries will be much smaller. Those 17 will not grow ever. Their children will grow with time (slowly).

@etianen
Copy link
Owner

etianen commented Dec 20, 2018 via email

@n3storm
Copy link
Author

n3storm commented Dec 20, 2018

I realized there are roughly 18000 entries and would not duplicate within the next 5 years.

I will follow your advice @etianen, thank you very much :) and thank you for the KISS reminder ;)

@etianen
Copy link
Owner

etianen commented Dec 20, 2018 via email

@n3storm n3storm closed this as completed Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants