Elasticsearch 6.x 的分页查询数据
2018-03-03 13:00
148 查看
{ "size" :3, "query": { "match" : { "person_name" : "张老师" }}, "search_after": [1244735520000, 805649], "sort": [ {"create_time": "asc"}, {"pk": "desc"} ] }
URL http://10.10.6.225:9200/t_resource_info/_search
方式:POST
返回的查询结果:
{ "took": 99, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 1452923, "max_score": null, "hits": [ { "_index": "t_resource_info", "_type": "doc", "_id": "199_805683", "_score": null, "_source": { "resource_format": "mp3", "pk": 805683, "structure_id": 77638, "person_id": 34, "id": "199_805683", "create_time": "2009-06-11 15:59:38", "table_name": "t_resource_info", "resource_type_name": "音频", "file_id": "C28DFAEF-904E-46C3-8119-4A78B0E337CE", "resource_type": 3, "resource_id_int": 772237, "@version": "1", "identity_id": 5, "area_code": 199, "resource_page": 0, "down_count": 0, "@timestamp": "2018-03-03T08:56:42.516Z", "resource_id_char": "417d63b5-4549-4012-83ba-3d33739dedf6", "resource_title": "最后一课", "type": "dsideal_db", "person_name": "张老师" }, "sort": [ 1244735978000, 805683 ] }, { "_index": "t_resource_info", "_type": "doc", "_id": "199_805700", "_score": null, "_source": { "resource_format": "mp3", "pk": 805700, "structure_id": 77643, "person_id": 34, "id": "199_805700", "create_time": "2009-06-11 16:02:22", "table_name": "t_resource_info", "resource_type_name": "音频", "file_id": "8CD3DA0A-63F2-4CBF-BCA6-0D14345813D5", "resource_type": 3, "resource_id_int": 772254, "@version": "1", "identity_id": 5, "area_code": 199, "resource_page": 0, "down_count": 0, "@timestamp": "2018-03-03T08:56:42.517Z", "resource_id_char": "c60247c3-5ab3-41b1-b772-40d24ed187a3", "resource_title": "最后一课", "type": "dsideal_db", "person_name": "张老师" }, "sort": [ 1244736142000, 805700 ] }, { "_index": "t_resource_info", "_type": "doc", "_id": "199_805719", "_score": null, "_source": { "resource_format": "mp3", "pk": 805719, "structure_id": 77648, "person_id": 34, "id": "199_805719", "create_time": "2009-06-11 16:09:18", "table_name": "t_resource_info", "resource_type_name": "音频", "file_id": "1F6F1D59-FF2D-43CF-B4ED-A08CB62F2943", "resource_type": 3, "resource_id_int": 772273, "@version": "1", "identity_id": 5, "area_code": 199, "resource_page": 0, "down_count": 0, "@timestamp": "2018-03-03T08:56:42.567Z", "resource_id_char": "c1c6fc35-aa64-4c83-9322-ef62ec82ff2d", "resource_title": "最后 一课", "type": "dsideal_db", "person_name": "张老师" }, "sort": [ 1244736558000, 805719 ] } ] } }
相关文章推荐
- elasticsearch 查询数据 | 分页查询
- mysql 分组查询数据时,如何获得用于分页的总记录数?
- ElasticSearch 数据查询
- Mysql Oracle sqlserver 数据分页查询语句
- Sql查询数据分页显示
- Oracle, SQL Server, My SQL数据分页查询语句汇总
- laravel如何查询elasticsearch的数据
- php中如何分页显示查询数据结果
- ElasticSearch速学 - 快速领悟:创建索引、api初步探索、查询数据
- 如何优化Mysql千万级快速分页,limit优化快速分页,MySQL处理千万级数据查询的优化方案!(zz)
- java web中使用过滤器实现数据查询的分页显示
- 有关Java从数据库查询出的数据导出Excel POI分页功能总结
- 从后台一次查询所有数据,在前端用js进行分页处理,不再次走数据库
- MySQL 查询分页数据中分组后取每组的前N条记录
- hibernate_数据分页, 查询总数
- Mybatis+mysql动态分页查询数据案例——配置映射文件(HouseDaoMapper.xml)
- MVC中使用Linq To Sql进行数据查询及分页
- MySql查询分页数据
- 基于百度地图SDK和Elasticsearch GEO查询的地理围栏分析系统(1)-数据准备
- 新闻数据分页查询的优化