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 is the procedure for installing the extension in UNIX:

There are 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:

1. For libcurl:

sudo apt-get install php5-curl

2. For libxml:

sudo apt-get install libxml2

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

1. git clone https://github.com/lukaszkujawa/php-pecl-solr.git
2. cd php-pecl-solr/

If the above two dependencies were already installed, execute:

3. sudo ./configure 
4. sudo make
5. sudo make install

The above procedure will compile and install it in the extension_dir directory in the php.ini file. To enable, the installed extension, you could follow any of the following two steps:

1. Navigate to the directory etc/php5/conf.d and create a new solr.ini file with the following line:

extension=solr.so

2. Open your php.ini file and include the following line:

extension=solr.so

You may follow any of the above two steps. You will need to restart your apache server after that by executing /etc/init.d/apache2 restart

You can now view the solr extension by executing echo phpinfo(); in browser or php -m in Terminal (Alt+T)

After installing the php-pecl-solr extension, users will have to download Apache Solr and keep it in an external directory.

Schedule

Design

See also