mc1392
December 13, 2016, 8:52pm
1
No matter what keyword I pass in, I get all of my documents in the response. Even those not matching my search criteria.
Here is the PHP code:
$params = [
'index' => 'ats_search_engine',
'body' => [
'query' => [
'fuzzy' => [
'_all' => $keyword
]
]
]
];
$response = $client->search ( $params );
Not sure why this is happening?
mc1392
December 15, 2016, 5:06pm
2
Seems the PHP array way of constructing the request is not working for me.
I decided to try this, which worked:
$json = '{
"query" : {
"match" : {
"title" : "members"
}
}
}';
$params['index'] = 'ats_search_engine';
$params['type'] = 'thoracic';
$params['body'] = $json;
So, just to repeat, the array way of doing things is not working for me.
system
(system)
Closed
January 12, 2017, 5:06pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.