Elasticsearch PHP client pass value to query from array


(Muhammad Abbas (Mo Abbas)) #1

Hello,

I have an array and need to pass it's value to the query to be fetched.

$params=[
'index' => 'logstash-2017.08.14',
'type' => 'xms_api_station_info',
'body' => [
'query'=> [
'bool'=> [
'must'=> [
'match'=>[
'stationIpAddress'=> '.$newArray[0].'
]
]
]
]
]
];
$results = $client->search($params);

Thanks,


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.