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
Line 69: Line 69:
== Support For Other Non Core Modules ==
== Support For Other Non Core Modules ==


The search engine is extensible, and has a Document API for adding support for other modules. See the [Development:Search_engine_adapters|Developer Documentation].
The search engine is extensible, and has a Document API for adding support for other modules. See the [[Development:Search_engine_adapters|Developer Documentation]].


== Support For Other Physical Document Types ==
== 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.
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.

Revision as of 22:49, 29 November 2007

The Global Search Block is the user-side visible part of the internal Global Search Engine of Moodle, wich 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 search can be performed.

1. Get in administrator mode

2. Go to the Experimental section in Administration menu.

3. Activate the Global Search Engine.

4. 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.

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.

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

5. Go to the block, make a blank search

6. 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.

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

8. Try a search.

Converters "xxx to doc" Credits

All converters were choosed 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 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.
  • 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

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.