**整理成sql格式来看懂elastic**
1、多个字段多个and查询
sql格式:select * from product where title = 'xxxx' and pid = 12 limit 1,2000;
es格式:
$params = array(
'index' => '你的index',
'type' => '你的type',
'body'=>array(
'from'=>1,
'size'=>2000,
'query'=>array(
'bool'=>array(
'must'=>array(
array(
'match'=>array(
'pid'=>12,
),
),
array(
'match'=>array(
'title'=>'xxxx',
),
),
),
),
),
),
);
2、一个字段多个值查询,多个值可以用,区分
多个值,分批匹配
字段=》rjDetails,sgDetails,presellDetails,beforBgDetails,bgDetails