Joomla过滤基于自定义字段的文章

I have created a custom field in the admin menu lets call it students , id like to filter articles in my module based of this custom field , below is what i have done so far in my module :

  1. can get form post values in my mod_****.php:

    if (isset($_POST))
    {
        $post = $app->input->post->get('basicSearch', array(), 'array');
        $returnpost = ModSearchFormEducare::processform($post);
    }
    
  2. I can filter the articles based on category using Jlegacy api , helper.php

    public static function processform($post)
    {
        $post['study'] = 14; //some temporary cat_id
        $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => false));
        $app = JFactory::getApplication();
        $appParams = $app->getParams();
        $model->setState('params', $appParams);
    
        // Category filter
        $model->setState('filter.category_id',$post['study'] );
    
        //  $returnpost = $model->getItems();
        return  $returnpost ;
    }
    
  3. What I'd like to achieve is set a filter based on custom fields in created in admin, this I have seen are stored in attribs column in __content table. Any help is appreciated.