我尝试修改现有查询字符串以筛选指定的条件:现在查询字符串如下:
String bodycontent="{"
+" \"_source\": [\"@timestamp\",\"eqpid\",\"lotid\",\"stageid\",\"srvmethod\",\"parm_1\",\"apcack\",\"description\",\"host\",\"path\",\"action\"],"
+" \"query\": {"
+" \"query_string\" : {"
+" \"query\":\" lotid:"+q_lotid+" AND "+host_type+"\"}"
+" },"
+" \"sort\" : [{\"@timestamp\" : { \"order\" : \"desc\" }}]"
+"}";
我想更改以下查询条件:
query :
type:ams_log AND (alm_source:K*) AND (alm_id:TCS00004 OR alm_id:TCS00005 OR alm_id:TCS00007 OR alm_id:TCS00008 OR alm_id:TCS00009 OR alm_id:TCS00010 OR alm_id:TCS00011 OR alm_id:TCS00012 OR alm_id:TCS00013 OR alm_id:TCS00020 OR alm_id:TCS00024 OR alm_id:TCS00032)
但是我不知道如何用斜杠修改查询字符串 \
和双引号 "
. 我找不到规则,谢谢!
1条答案
按热度按时间qcuzuvrc1#
斜杠-
\\
引用-\"
```System.out.println("\ "hello"");