I try to modify existing query string to filter specified condition: now query string is below:
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\" }}]"
+"}";
I want to change the query condition below:
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)
but I am confused how to modify the query string with slash \
and Double quotes "
.
I can't find the rule, thanks!