Hi All,
I am writing a search query which involves wildcards now.This works fine now. But my new requirement says to apply a must or match query along with the wildcard.
$match[] = array("wildcard" => array("full_name" => strtolower((Input::get('Name'))."*"));
$match[] = array("wildcard" => array("address" => strtolower((Input::get('Address'))."*"));
$match[] = array("wildcard" => array("email" => strtolower((Input::get('Email'))."*"));
//////this is the match or must should apply
$match[] = array("should" => array("Gender" => strtolower(Input::get('Gender'))));
$searchParams['body']['query']['bool']['should'] = array($match);
but if i apply like this, query returns an error.according to the error i feel that i cannot apply match and wildcard together.
is there any way of doing that?
Any help would be great.or any suggestions are welcome