Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Global Search set-up.

Global Search set-up: Difference between revisions

From MoodleDocs
 
(16 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{Global Search}}
The Global Search Block is the user-side visible part of the internal Global Search Engine of Moodle, which is located in the "search" directory of the Moodle distribution.
The Global Search Block is the user-side visible part of the internal Global Search Engine of Moodle, which is located in the "search" directory of the Moodle distribution.


Line 6: Line 7:


The search engine is based on an updated Lucene engine, part of the Zend framework.
The search engine is based on an updated Lucene engine, part of the Zend framework.


== Installing the block ==
== Installing the block ==
Line 23: Line 25:
4. Access the Global Search settings via the link in ''Administration > Modules > Blocks''.
4. Access the Global Search settings via the link in ''Administration > Modules > Blocks''.


5. Edit sitewide parameters of the search block. You should NOT have to change anything, unless if the extra libs for converting files to text have been deployed in an unusual place.
5. Edit sitewide parameters of the search block. You should NOT have to change anything, unless the extra libs for converting files to text have been deployed in an unusual place.


[[image:global_search_params.jpg]]  
[[image:global_search_params.jpg]]  


Note that for indexing physical files, you need to get additional converters that are in the CVS at contrib/patches/global_search_libraires. I collected these converters for Windows and Linux support. Some of them may have addtional support for other OS distributions.
Note that for indexing physical files, you need to get additional converters that are in the CVS at contrib/patches/global_search_libraries. I collected these converters for Windows and Linux support. Some of them may have additional support for other OS distributions.


You may activate here for indexing physical files or not. Eventually change some path setup if needed.
You may activate here for indexing physical files or not. Eventually change some path setup if needed.
'''VERY IMPORTANT : On Linux systems, check the converters have execution permission (X set).'''


6. Go to the block, make a blank search.
6. Go to the block, make a blank search.
Line 35: Line 39:
7. Browse to the "statistics". Being administrator, you'll have additional links to perform the first-time-indexing. Once done, the cron should update the indexes with deleted, updated and added keys.
7. Browse to the "statistics". Being administrator, you'll have additional links to perform the first-time-indexing. Once done, the cron should update the indexes with deleted, updated and added keys.


Beware : if you have many document, this process might be heavy and time spending. Try at night if possible.
Beware : if you have many documents, this process might be heavy and time consuming. Try at night if possible.


8. The indexer will report you what has been indexed for each supported module.
8. The indexer will report what has been indexed for each supported module.


9. Try a search.
9. Try a search.
Line 43: Line 47:
== Converters "xxx to doc" credits ==
== Converters "xxx to doc" credits ==


All converters were choosed being opensource.  
All converters were chosen for being opensource.  


* ''Antiword'' is an open source for converting Microsoft(tm) Word format in to raw text.
* ''Antiword'' is an open source for converting Microsoft(tm) Word format in to raw text.
Line 50: Line 54:
Additional converters were produced specially for Moodle
Additional converters were produced specially for Moodle


* Powerpoint(tm) text extractor : a special extractor algorithme designed for Moodle. This algorithm is based on a raw recognition of the internal format of .PPT files, and is based on the Office 97(tm) format.
* Powerpoint(tm) text extractor : a special extractor algorithm designed for Moodle. This algorithm is based on a raw recognition of the internal format of .PPT files, and is based on the Office 97(tm) format.
* HTML and XML extractors : a simple extractor that strips out any tag and markup and keeps only CDATA sequences.
* HTML and XML extractors : a simple extractor that strips out any tag and markup and keeps only CDATA sequences.


Line 64: Line 68:
* '''Data:''' indexes a database entry as a single document
* '''Data:''' indexes a database entry as a single document
* '''Lesson:''' indexes lesson pages as a single entry
* '''Lesson:''' indexes lesson pages as a single entry
* '''Files:''' Global search '''does NOT index''' contents of documents that are stored in the '''Files''' area of the course.  If you want to rely on global search, it is best to try to mention each document stored in the files area by title with a content description so they can be found more easily.
=== Search Scope ===
Searches all above modules (item title and contents) in all courses in which the current users is enrolled.
Global search does not search in directories. Only linked documents will be indexed.


=== Non-core modules ===
=== Non-core modules ===
Line 79: Line 89:
==See also==
==See also==


[[Global Search block settings]]
* [http://www.youtube.com/watch?v=VMyXdvBRuho Video tutorial on how to enable the Global Search in Moodle]
[[search/stats]]
 


[[Category:Block]]
[[de:Globale_Suche_%28Block%29]]

Latest revision as of 16:02, 16 December 2012

The Global Search Block is the user-side visible part of the internal Global Search Engine of Moodle, which is located in the "search" directory of the Moodle distribution.

The Global Search Block provides user with a search form interface, that will query all searchable entries in Moodle.

The searchable entries are "virtual documents" extracted from Moodle course data and database, that each activity module or block will provide to the search engine for indexing.

The search engine is based on an updated Lucene engine, part of the Zend framework.


Installing the block

The search engine itself is being part of the Moodle distribution. The block is installed as standard, but is not used on the default layout.

Setup of the global search engine

The Global Search Engine must be activated and initialized before searches can be performed.

1. Login as an administrator.

2. Access Administration > Miscellaneous > Experimental.

3. Activate the Global Search Engine by checking the enableglobalsearch box.

4. Access the Global Search settings via the link in Administration > Modules > Blocks.

5. Edit sitewide parameters of the search block. You should NOT have to change anything, unless the extra libs for converting files to text have been deployed in an unusual place.

global search params.jpg

Note that for indexing physical files, you need to get additional converters that are in the CVS at contrib/patches/global_search_libraries. I collected these converters for Windows and Linux support. Some of them may have additional support for other OS distributions.

You may activate here for indexing physical files or not. Eventually change some path setup if needed.

VERY IMPORTANT : On Linux systems, check the converters have execution permission (X set).

6. Go to the block, make a blank search.

7. Browse to the "statistics". Being administrator, you'll have additional links to perform the first-time-indexing. Once done, the cron should update the indexes with deleted, updated and added keys.

Beware : if you have many documents, this process might be heavy and time consuming. Try at night if possible.

8. The indexer will report what has been indexed for each supported module.

9. Try a search.

Converters "xxx to doc" credits

All converters were chosen for being opensource.

  • Antiword is an open source for converting Microsoft(tm) Word format in to raw text.
  • Xpdf is an open source converter for extracting raw text from Adobe(tm) Pdf.

Additional converters were produced specially for Moodle

  • Powerpoint(tm) text extractor : a special extractor algorithm designed for Moodle. This algorithm is based on a raw recognition of the internal format of .PPT files, and is based on the Office 97(tm) format.
  • HTML and XML extractors : a simple extractor that strips out any tag and markup and keeps only CDATA sequences.

Supported modules

Core modules supported

  • Forum: indexes separately "thread heads" and other posts
  • Wiki: indexes wiki pages
  • Chat: indexes sessions as a single document
  • Glossary: indexes glossary entries
  • Resource: indexes all resources, including physical files of supported types
  • Data: indexes a database entry as a single document
  • Lesson: indexes lesson pages as a single entry
  • Files: Global search does NOT index contents of documents that are stored in the Files area of the course. If you want to rely on global search, it is best to try to mention each document stored in the files area by title with a content description so they can be found more easily.

Search Scope

Searches all above modules (item title and contents) in all courses in which the current users is enrolled. Global search does not search in directories. Only linked documents will be indexed.

Non-core modules

  • Techproject: the technical project manager by Valery Fremaux

Support for other non-core modules

The search engine is extensible, and has a Document API for adding support for other modules. See the Developer Documentation.

Support for other physical document types

The Search engine has an extensible physical converter model, although adding formats may need change in the block itself (such as adding more configuration parameters). See the Developer Documentation.

See also