spark 读取 es 的es查询语法

有2种方式

String esQuery = "?q=_exists_:oid AND opeType:(-GetBluetoothKey -DbToDoBizListQuery -GenToken -GetMenuData)";
DataFrame esDF = JavaEsSparkSQL.esDF(sqlContext, "log4j-emobilelog/emobilelog", esQuery);

String esQuery = "{\"query\":{\"range\":{\"@timestamp\":{\"gt\":\"2016-11-14T16:00:00.000Z\"}}}}";
DataFrame esDF = JavaEsSparkSQL.esDF(sqlContext, "log4j-emobilelog/emobilelog", esQuery);



你可能感兴趣的:(elasticsearch,spark)