我正在使用 javascript-elasticsearch API 来搜索数据。但是,我需要根据他们的工作室限制对某个组的访问。例如:
obj1
title = Titanic
studio = Fox
obj2
title = Lion King
studio = Disney
我可以查询:?q=&studio=disney
,但这可以由恶意用户在 javascript 中进行调整q=&studio=
。有没有办法&studio=X
在我正在使用的 API 密钥或 elasticsearch 本身中设置这个限制()?这将如何完成,如果无法完成,上述问题的最佳解决方案是什么?