记录常用的es 查询 聚合 GET _cat / indices GET / p_ext_develop / _mapping / g GET / p_ext_develop / _analyze { "field": "other_name_en", "text": "(3S)-N-Boc-2-azabicyclo[2.2.1]heptane-3-carboxylicacid;"} GET / hs2840 / _analy…
# es 查询更新操作# _*_ coding: utf-8 _*_ import time import datetime import pymysql from elasticsearch import Elasticsearch from urllib3.connectionpool import xrange # class EsClient(): es_host = "192.168.8.190" port = 9200 timeout = 15000 global inde…
本文只是写一些常用es命令,这里不用任何客户端,只用 9200/_plugin/head/ 那个端口网页就可以,然后是复合查询. 注意es其实一个idnex只能有一个type,如果一个index做了多个type,坑...太多了,首先 where不能用,然后 聚合也不能用.至少在es2.*是这样的,这个坑你可以搜索下"_type Field Not Available for Aggregation #5634" 1. 查询所有关键字:match_all等同SQL select * fr…
测试数据:create table test1 as select * from dba_objects where rownum<=10000;--10000条记录create table test2 as select * from dba_objects;--13438条记录 分析执行计划:SQL1:SQL> select * 2 from test 3 where object_id = 4 (select max(object_id) 5 from test1 6 where tes…
一.子查询 子查询:把一条查询语句,当做值来使用子句的查询结果必须是一列子句可以返回多行数据,但必须是一列 子句返回的值为一个值的时候: 例如: 我只知道c026这个编号,我要查询比这个车价格低的全部车辆信息select *from car where price<(select price from car where code='c026') --先执行括号内返回一个值,再执行外边.此时括号内返回的是一个值的时候 若子句返回的是一列值而不是一个值的时候: 例如: 查询油耗与c016相等的…