搜索结果正在快递途中

es的查询问题

Elasticsearch | 作者 zhangxinhong | 发布于2019年03月07日 | 阅读数:1598

现在有个需求, 根据一堆查询条件查询出符合条件的accessId字段值,然后再根据这些字段值查询出所属的完整信息, 然后分页,就类似于关系数据库的 select * from table_name1 where id in (select id from table_name2 where username=xxx and password = xxx) limit 0 10,  es查询该怎么写? 求大佬赐教
已邀请:

rochy - rochy_he

赞同来自:

只能查询两次,无法通过单词查询获取结果
先查询 select id from table_name2 where username=xxx and password = xxx 获取 id
然后在查询 in ids 的结果,然后进行分页

要回复问题请先登录注册