Add core_blog as a search area

Add core_blog as a search area

by Jacket Racket -
Number of replies: 0

Hello everyone! I am new to Moodle and I need to add core_blog as a search area.

I am following this: https://docs.moodle.org/dev/Search_API

This is what my blog/classes/search/blog.php looks like right now:

_____________________________________________________________________________________________________________________________________________________

namespace core_blog\search;

defined('MOODLE_INTERNAL') || die();

class blog extends \core_search\base_activity
{
    public function uses_file_indexing()
    {
        return true;
    }
}

_____________________________________________________________________________________________________________________________________________________


When I try to reindex the search, I get the following error:
Processing area: Blogs
!!! Error reading from database !!!


Can anyone tell me what I might be doing wrong? Or can anyone point me to any guide that shows how to add blogs as search area?
Thank you.

Average of ratings: -