Weekly Report 6 Gsoc @ Moodle

week 6(12 july- 19 july)

Indexing Rich types With Solr(Integration of Tika with Apache Solr)

Moodle Courses may have attachments with them. There are two types o f attachment with moodle Courses.

1. Course Summary files(only images types are allowed)

2. Course Overview files (all types with unlimited uploads)

Apache Tika Integration With Solr

Step 1:- Configure SolrConfig.xml Requesthandler

<requestHandler name="/update/extract"  startup="lazy" class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<!-- All the main content goes into "text"... if you need to return
the extracted text or do highlighting, use a stored field. -->
<str name="fmap.content">text</str>
<str name="lowernames">true</str>
<str name="uprefix">ignored_</str>

<!-- capture link hrefs but ignore div attributes -->
<str name="captureAttr">true</str>
<str name="fmap.a">links</str>
<str name="fmap.div">ignored_</str>

Step 2:- Adding Fields need to be indexed inside Schema.xml
<field name="content" type="text" indexed="true" stored="true" multiValued="true"/>
Step 3:-  Accessing links of the attachments from moodle & creating the POST request to /update/extact

$fs = get_file_storage();
$context = context_course::instance($courseid);
$files = $fs->get_area_files($context->id, 'course', 'overviewfiles',false,filename,false);  //loop through files and extract URL

Step 4:- Search through the documents :)

SO What's Next Week ?

1. prepare the README & Installation Instruction of plugin.

2. Optimize the Code.

3. Test the Code with different test cases and submit.

4. Prepare for mid term evalution.

5 thoughts on “Weekly Report 6 Gsoc @ Moodle

  1. I drop a comment whenever I appreciate a article on a site or if I have something to valuable to contribute to the
    discussion. It’s triggered by the fire communicated in the article I looked at.

    And on this post Weekly Report 6 Gsoc @ Moodle | Shashitechno.
    I was excited enough to post a commenta response 😉 I do have some questions for you
    if it’s allright. Is it simply me or does it seem like
    a few of the comments look like coming from brain dead people?
    😛 And, if you are writing at other online social sites,
    I would like to keep up with you. Would you list every one of all your communal sites like your twitter feed, Facebook page or linkedin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s