Limit search result by user

Hello,
Can elasticsearch limit search result by user?

for example user "testing" can only view search result only for 1 week or 1000 docs.

Welcome @Ingram_Gultom!

I think what you want is having a role that allows you to restrict search results based on some condition. For this we have Document Level Security feature that allows restricting access to particular documents within an index. You can use a query and the documents will be restricted to those that satisfy the query conditions.
Following links can help:
https://www.elastic.co/guide/en/elastic-stack-overview/current/document-level-security.html
https://www.elastic.co/guide/en/elastic-stack-overview/current/field-and-document-access-control.html

Hope this helps.

Regards,
Yogesh Gaikwad

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.