Global search (GSoC2013): Difference between revisions
No edit summary |
No edit summary |
||
Line 45: | Line 45: | ||
sudo make | sudo make | ||
sudo make install | sudo make install | ||
Next, you will be ready to install the PECL extension for Solr by cloning the following repository for Solr 4.x: | Next, you will be ready to install the PECL extension for Solr by cloning the following repository for Solr 4.x: | ||
Line 73: | Line 71: | ||
You can now view the '''solr''' extension by viewing the executing | You can now view the '''solr''' extension by viewing the executing | ||
<code php>phpinfo();</code> | <code php>echo phpinfo();</code> | ||
== Schedule == | == Schedule == |
Revision as of 18:42, 5 June 2013
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:
1. 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
2. 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:
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
OR, if you compiled the libcurl and libxml libraries from source and installed using "/root/custom/software" as the --prefix, execute :
3A. sudo ./configure --with-curl=/root/custom/software --with-libxml-dir=/root/custom/software
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 after that.
/etc/init.d/apache2 restart
You can now view the solr extension by viewing the executing
echo phpinfo();