With a 'IN' clause you need to use a comma rather a semi-colon
So 'age_min:request:'.implode(';', $a_age), can't work.
Then if your form provide two values (min and max) to find all the results with tv value (age here) between these bounds do as follow:
$a_age = array();
$age_min = $_REQUEST['age_min'];
$age_max = $_REQUEST['age_max'];
for($i=$age_min; $i<=$age_max; $i++)
{
$a_age[] = strval($i);
}
$lst_age = implode(',', $a_age);
$andConditions = array(
'tv.age:IN' => $lst_age . ':integer',
);Download queryHook example zip file from on
http://www.revo.wangba.fr/advsearch-documentation.html and look at the example 7 (demo :
http://www.revo.wangba.fr/faceted-search-7.html ).
In this demo the IN clause is used for the selection of a subset of document id (French or English documents). Simply by using:
$andConditions = array(
'modResource.id:IN' => $lstids . ':integer'
);
Keep in mind, that you could use "request" type of value only if you get the value from the form without change. If you use your internal variable like lst_age, you can't use "request",
To do the same thing (and probably with a faster sql request) you could use:
$min = $_REQUEST['age_min'];
$max = $_REQUEST['age_max'];
$andConditions = array(
'tv.e:=' => 'e:request:all',
....
);
if ($min <= $max) {
$andConditions['tv.age:>='] = $min . ':integer';
$andConditions['tv.age:<='] = $max . ':integer';
}