Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Global search (GSoC2013)

From MoodleDocs

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

Global search
Project state Community bonding period
Tracker issue MDL-31989
Discussion XXX
Assignee Prateek Sachan

GSOC '13

Introduction

Global Search will have the feature of searching keywords within the entire Moodle site across modules keeping the security intact. It will also be able to search for keywords from externally attached files. (PPTX, PDF, etc.)

Installation

For using Global Search, users will have to install the PHP Solr PECL extension on server.

Following are the two dependencies of the extension:

  • CURL extension (libxml2 2.6.26 or later is required)
  • LIBXML extension (libcurl 7.15.0 or later is required)

Test whether the required extensions are installed or not by executing the following in a php file (Remember to delete the file as it has important information about your system):

echo phpinfo();

If the system does not have required versions of libcurl or libxml libraries, follow the steps given below:

  • For libcurl:
wget http://curl.haxx.se/download/curl-7.19.6.tar.gz
tar -zxvf curl-7.19.6.tar.gz
cd curl-7.19.6
sudo ./configure --prefix=/root/custom/software
sudo make 
sudo make install
  • For libxml:
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.6.tar.gz
tar -zxvf libxml2-2.7.6.tar.gz
cd libxml2-2.7.6
sudo ./configure --prefix=/root/custom/software
sudo make
sudo make install


Next, you will be ready to install the PECL extension for Solr by cloning the following repository for Solr 4.x:

git clone https://github.com/ukaszkujawa/php-pecl-solr.git
cd php-pecl-solr/

If the above two dependencies were already installed, execute:

sudo ./configure 

Else, if you just compiled libcurl from source and installed using "/root/custom/software" as the --prefix, execute :

sudo ./configure --with-curl=/root/custom/software

OR, if you just compiled libxml from source and installed using "/root/custom/software" as the --prefix, execute :

sudo ./configure --with-libxml-dir=/root/custom/software

OR, Else, if you just compiled both libcurl and libxml from source and installed using "/root/custom/software" as the --prefix, execute :

sudo ./configure --with-curl=/root/custom/software --with-libxml-dir=/root/custom/software
sudo make
sudo make install

Restart your

Schedule

Design

See also