Search paramter function

In cakephp4 i am looking for a search function plugin so i can add parameters.
Previously i was using code like this for such a search and i am looking for a plugin

           if (isset($this->request->data['search'])) {  
                 $filter_url['controller'] = $this->request->params['controller'];
                 $filter_url['action'] = $this->request->params['action'];
                $filter_url['page'] = 1;
    // for each filter we will add a GET parameter for the generated url
    foreach($this->request->data as $name => $value){
                   //need to add this to ignore the checkbox returned whcih should not appear on address bar as a search option
              
        if($value){
            $filter_url[$name] = urlencode($value);
                  // debug($value);
        }
                }
    //Post params are now GET paramaters
    return $this->redirect($filter_url);
                
          }//if isset     
          
          
    } // if post
    
    
    
    foreach($this->request->query as $param_name => $value):
        if ($param_name=='lastname')  $searchLastName =$value;
        if ($param_name=='firstname')  $searchFirstName =$value;
       if ($param_name=='startDate')  $searchDate =$value;
         if ($param_name=='endDate')  $searchDate2 =$value;
        if ($param_name=='xeroDate')  $searchDate3 =$value;
        if ($param_name=='subject')  $searchSubject =$value;
       if ($param_name=='state')  $searchState =$value;  
      
    endforeach;

Have you looked at elastic search.

no but i dont think its a get search with parameters that appear in the url like my previous search.

Many times I write conditional in model similar to a “laravel” query scope, something like:

    public function getDogsAdmin($offset = '', $rowsperpage = '', $dogsearch = '', $aval = '')
    {
        $dogsch = $dogsearch . "%";
        $pg = ($offset / $rowsperpage) + 1;
        $pagingQuery = "LIMIT {$offset}, {$rowsperpage}";
        $dogs = TableRegistry::getTableLocator()->get('Dogs');
        
        $query = $dogs->find()
                ->where(['dogname LIKE' => $dogsch]);
        if ($aval == "n") {
            $query->Where(['adopted' => 1]);
        } else if ($aval == "y") {
            $query->Where(['adopted' => 0]);
        }
        $query->orderDesc('lastedit')
                ->limit($rowsperpage)
                ->page($pg);
        return $query;
    }

So far never had a problem. And not shown, a count is needed.

hi i am talking about 5/6 possible input parameter from a form search which the parameters can be stored for more searches.
Does something like this exist as i am only seeing basic search examples without parameter storing?