$_date = CValue::get("_date");
$specific_user = CValue::get("user_id");
$start = (int) CValue::get("start", 0);
$names_types = CValue::get("names_types", array());
$contextes = CValue::get("contextes", array());
$aggregate = CValue::get("aggregate");
if (in_array("CPrescriptionLineMedicament", $names_types)) {
    $names_types[] = "CPrescriptionLineMix";
    $names_types[] = "CPrescriptionLineElement";
}
// Données nécessaires pour la recherche
new CSearch();
$client_index = new CSearchLog();
$client_index->createClient();
$words .= $client_index->constructWordsWithDate($_date, $_min_date, $_max_date);
$words = $client_index->constructWordsWithType($words, $names_types);
$words = $client_index->constructWordsWithUser($words, $specific_user);
// Recherche fulltext
$time = 0;
$nbresult = 0;
$array_results = array();
$array_highlights = array();
$array_aggregation = array();
$objects_refs = array();
$authors = array();
$author_ids = array();
try {
    $results_query = $client_index->searchQueryString('AND', $words, $start, 30, $contextes, $aggregate);
    $results = $results_query->getResults();
    $time = $results_query->getTotalTime();
    $nbresult = $results_query->getTotalHits();