I have a bunch of items to search. Normally I would put them in one index
and they are searchable. But I have the restriction that every user should
only see a specific subset of all the items.
The problem is I don't know how to implement this performantly. One option
would be to include the user-ids who are allowed to search or see the item
as a field. The second one would be to create a own index for every user -
but here's the question how the performance is if there are 5000+ users or
maybe even more.
Is there another elegant solution to this problem I haven't found out yet?
Searching didn't return anything useful to me.
I have a bunch of items to search. Normally I would put them in one
index and they are searchable. But I have the restriction that every
user should only see a specific subset of all the items.
You can use alias filters:
You have one index which contains data for all your users.
You have one alias for each user, which specifies the filter
to be applied for that alias (eg { term => { user_id => 123}}
I have a bunch of items to search. Normally I would put them in one
index and they are searchable. But I have the restriction that every
user should only see a specific subset of all the items.
You can use alias filters:
You have one index which contains data for all your users.
You have one alias for each user, which specifies the filter
to be applied for that alias (eg { term => { user_id => 123}}
I have a bunch of items to search. Normally I would put them in one
index and they are searchable. But I have the restriction that every
user should only see a specific subset of all the items.
You can use alias filters:
You have one index which contains data for all your users.
You have one alias for each user, which specifies the filter
to be applied for that alias (eg { term => { user_id => 123}}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.