Diferencia entre revisiones de «Búsqueda global»

De MoodleDocs
(tidy up)
(tidy up)
Línea 3: Línea 3:
{{Nuevas características de Moodle 3.1}}
{{Nuevas características de Moodle 3.1}}
==¿Qué es búsqueda global?==
==¿Qué es búsqueda global?==
*Búsqueda global le permite a Usted buscar en todas partes en el sitio Moodle al que Usted tenga acceso. Un estudiante puede buscar en sus cursos algunas notas (apuntes) de curso, por ejemplo; o un profesor puede buscar actividades relacionadas con algún asunto..
*Búsqueda global le permite a Usted buscar en todas partes en el sitio Moodle al que Usted tenga acceso. Un estudiante puede buscar en sus cursos algunas notas (apuntes) de curso, por ejemplo; o un profesor puede buscar actividades relacionadas con algún asunto.
*La característica de Búsqueda global tiene que ser habilitada por el administrador y entonces estará disponible una caja para búsqueda junto al menú del usuario.
*La característica de Búsqueda global tiene que ser habilitada por el administrador y entonces estará disponible una caja para búsqueda junto al menú del usuario.


[[File:NFGlobalsearchbox.png|thumb|center|480px|Buscando en el sitio (cuando está habilitada la búsqueda global)]]
[[File:NFGlobalsearchbox.png|thumb|center|480px|Buscando en el sitio (cuando está habilitada la búsqueda global)]]


*También puede añadirse un [[Bloque de búsqueda global]]a páginas de curso.
*También puede añadirse un [[Bloque de búsqueda global]] a páginas de curso.


==¿Cómo funciona?==
==¿Cómo funciona?==

Revisión del 16:17 6 may 2016

Nota: Urgente de Traducir. ¡ Anímese a traducir esta muy importante página !.     ( y otras páginas muy importantes que urge traducir)

translator note icon.png Nota del traductor: Al momento de escribir esta documentación (mayo 2016) este nuevo plugin para Moodle 3.1 ya estaba 100% traducido al Español de México, pero no al Español internacional, por lo que algunos usuarios verán los textos en el idioma inglés original.


¡Nueva característica
en Moodle 3.1!

¿Qué es búsqueda global?

  • Búsqueda global le permite a Usted buscar en todas partes en el sitio Moodle al que Usted tenga acceso. Un estudiante puede buscar en sus cursos algunas notas (apuntes) de curso, por ejemplo; o un profesor puede buscar actividades relacionadas con algún asunto.
  • La característica de Búsqueda global tiene que ser habilitada por el administrador y entonces estará disponible una caja para búsqueda junto al menú del usuario.
Buscando en el sitio (cuando está habilitada la búsqueda global)

¿Cómo funciona?

  • Haga click en el ícono para buscar que está cerca del menú del usuario y escriba un término a buscar dentro dede la caja que aperece, o escriba dentro de la caja en el Bloque de búsqueda global si estuviera habilitado.
  • En la pantalla siguiente, Usted puede simplemente hacer click en el botón de búsqueda para buscar en cualquier lado, o puede expandir el Filtro para buscar en áreas específicas:
Filtrando la búsqueda
  • Usted verá entonces los resultados mostrados desde todas las áreas de Moodle a las que Usted tenga acceso:
Resultados de búsqueda

¿Cómo se configura?

Nota: Global search needs a search engine. Instructions for the installing the PHP Solr extension and a Solr server are below. See the Developer docs on Search engine plugins if you wish to write your own.


  1. Enable Global search in Site administration > Advanced features
  2. Set the feature up in Site administration > Plugins >Search > Manage global search by selecting Solr as the search engine and ticking search area checkboxes as required
  3. In Site administration > Plugins > Search > Solr, set Host name to localhost, Port to 8983 and Index name to 'moodle' (the name of the index in Solr)

Como instalar Solr

You need PHP Solr extension installed. You can download the official latest versions from [1](http://pecl.php.net/package/solr) The minimum required version is PECL Solr 2.1 for PHP 5 branch and PECL Solr 2.4 for PHP 7 branch.

Basic installation steps (using apache web server):

Linux (Debian/Ubuntu)

   sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev
   sudo apt-get install php5-dev
   sudo apt-get install php-pear
   sudo pecl install solr
   sudo service apache2 restart
   sudo sh -c "echo 'extension=solr.so' > /etc/php5/apache2/conf.d/solr.ini"
   sudo sh -c "echo 'extension=solr.so' > /etc/php5/cli/conf.d/solr.ini"

OSX using macports

   sudo port install apache-solr4
   sudo port install php54-solr

OSX using homebrew

   brew install homebrew/php/php56-solr

Windows

Install the pecl package as usual. (This has not yet been tested.)

El servidor Solr

Moodle 3.1 supports Solr server from 4.0 onwards, although you can only use the Solr schema setup script that we provide with Moodle from Solr 5. The latest Solr 5 available version is the recommended one; the same will apply to Solr 6 once it is released.

The following example snippet (feel free to copy & paste into a .sh script with execution permissions) will download Solr 5.4.1 (replace it with latest 5.x) in the current directory, start the solr server and create an index in it named moodle to add moodle data to it.

   #!/bin/bash
   set -e
   SOLRVERSION=5.4.1
   SOLRNAME=solr-$SOLRVERSION
   SOLRTAR=$SOLRNAME'.tgz'
   INDEXNAME=moodle
   if [ -d $SOLRNAME ]; then
       echo "Error: Directory $SOLRNAME already exists, remove it before starting the setup again."
       exit 1
   fi
   if [ ! -f $SOLRTAR ]; then
       wget http://apache.mirror.digitalpacific.com.au/lucene/solr/$SOLRVERSION/$SOLRTAR
   fi
   tar -xvzf $SOLRTAR
   cd $SOLRNAME
   bin/solr start
   bin/solr create -c $INDEXNAME
   # After setting it up and creating the index use:
   # - "/yourdirectory/solrdir/bin/solr start" from CLI to start the server
   # - "/yourdirectory/solrdir/bin/solr stop" from CLI to stop the server.
Solr 4 schema setup

You cannot use the schema setup script when using a Solr 4 server. If you really want to use the Solr 4x branch, here are the field types descriptions:

Extracted from search/classes/document.php

Field name Field type Stored Indexed Query field
id org.apache.solr.schema.StrField true false false
itemid org.apache.solr.schema.TrieIntField true true false
title org.apache.solr.schema.TextField true true true
content org.apache.solr.schema.TextField true true true
contextid org.apache.solr.schema.TrieIntField true true false
areaid org.apache.solr.schema.StrField true true false
type org.apache.solr.schema.TrieIntField true true false
courseid org.apache.solr.schema.TrieIntField true true false
owneruserid org.apache.solr.schema.TrieIntField true true false
modified org.apache.solr.schema.TrieDateField true true false
userid org.apache.solr.schema.TrieIntField true true false
description1 org.apache.solr.schema.TextField true true true
description2 org.apache.solr.schema.TextField true true true
solr_filegroupingid org.apache.solr.schema.StrField true true false
solr_fileid org.apache.solr.schema.StrField true true false
solr_filecontenthash org.apache.solr.schema.StrField true true false
solr_fileindexstatus org.apache.solr.schema.TrieIntField true true false
solr_filecontent org.apache.solr.schema.TextField false true true