Diferencia entre revisiones de «Búsqueda global»

De MoodleDocs
(actualizar)
(Updated as per 3.5 page)
(No se muestran 22 ediciones intermedias del mismo usuario)
Línea 1: Línea 1:
{{Urgente de traducir}}{{Actualizar}}
{{Pendiente de traducir}}{{Actualizar}}
{{Notadeltraductor|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.}}
{{Más características}}{{Nuevas características de Moodle 3.1}}{{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 en Características avanzadas y entonces, desde la página para Gestionar Búsqueda Global , debe seleccionarse el motor de búsqueda.
{{Nuevas características de Moodle 3.5}}
La Búsqueda Global Simple proporciona características de búsqueda global sin la necesidad de instalar un motor de búsqueda externo.
 
''(Pronto se podrá un enlace hacia un nuevo Screencast ..)''
Cuando está habilitada la Búsqueda Global, una caja de búsqueda está entonces disponible 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.
==¿Qué puedo buscar?==
Usted puede buscar sus cursos, información de [[Actividades|actividades]] y algunos contenidos de actividades tales como publicaciones en [[Foros|foros]], capítulos de [[Módulo_libro|libros]], entradas del [[Módulo_de_glosario|glosario]] o páginas de [[Módulo_de_wiki|Wikis colaborativos]].
{{Nuevas características de Moodle 3.4}}
El contenido de un [[Bloque HTML]] pueede ser buscado y, si el administrador habilita la configuración de "Buscar todos los cursos" entonces los cursos que sean visibles a usuarios pero en los cuales no estén inscritos (matriculados) también pueden ser buscados. (Estos cursos son cursos con acceeso de invitados o si el usuario tiene la capacidad de ver todos los cursos).


==¿Cómo funciona?==
==¿Cómo funciona?==
Línea 19: Línea 33:


[[File:31GSResults2.png|thumb|center|600px|Resultados de búsqueda]]
[[File:31GSResults2.png|thumb|center|600px|Resultados de búsqueda]]
===Características de la consulta de búsqueda Solr===
You can improve your search using any of the following search query features:
* Specifying the field to be searched by prefixing the search query with 'title:', 'content:', 'name:', or 'intro:' e.g.'title:news' returns results with the word 'news' in the title
* Boolean operators ('AND', 'OR', 'NOT') to combine or exclude keywords
* Wildcard characters ('*' or '?' ) to represent characters in the search query
* Proximity searches ('~') e.g. mood~2 returns "moodle" (2 letters away from "mood"), Moodle Australia~3 returns results containing "Moodle HQ in Perth, Australia" (the queried terms were within 3 words of each other)
* Boosting terms ('^') to boost certain words or phrases e.g. "Perth Australia"^5 "Australia" will return results with the phrase "Perth Australia" as more relevant.
'''Nuevo en Moodle 3.5''' : Nuevos campos ahora facilitan el filtrar por Id del usuario y buscar por grupo.
Note: The above features are only available when using the Solr search engine.


==¿Cómo se configura?==
==¿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 [https://docs.moodle.org/dev/Search_engines Developer docs on Search engine plugins] if you wish to write your own.}}
{{Nota|La búsqueda global necesita un motor de búsqueda. Las instrucciones para instala la extensión Solr de PHP y para instalar un servidor Solr están debajo. Vea los [https://docs.moodle.org/dev/Search_engines Developer docs on Search engine plugins] si desea escribir sus propias extensiones. Se le recomienda que primeramente configure todo, que indice (indexe) los contenidos del sitio ''y solamente entonces'' habilite la Búsqueda Global.}}
 
===Configurando Solr===
 
====Configuración general====


# 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
# 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)
# If you are using Solr with SSL encryption, you will need to configure Moodle as such. This is important if solr is not installed in the web server server.
## You will need a separate key file and cacert file, both in pem format, located on your server Moodle, and readable by the PHP process.
## Go to ''Site administration > Plugins > Search > Solr''
## Set '''Secure mode''' to Yes
## '''SSL certificate''' to /path/to/certs/solr-ssl.cacert.pem
## '''SSL key''' to /path/to/certs/solr-ssl.key.pem
## '''SSL key Password''' to The password used to lock the SSL Key
## '''SSL CA certificates name''' to /path/to/certs/solr-ssl.cacert.pem
# Index your site's data going to ''Site administration > Reports > Global search info'' or from the CLI running '''php admin/tool/task/cli/schedule_task.php --execute="\core\task\search_index_task"''' script, being the CLI script the recommended option for big sites.
# Enable Global search in ''Site administration > Advanced features''
# Enable Global search in ''Site administration > Advanced features''
# 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
 
# 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)
====Indizado de Archivos====
 
Solr has the ability to index the contents of files, such as File resources and attachments to Forum posts. This uses the [https://tika.apache.org/ Tika] engine which comes bundled with Solr. To enable this feature:
# In ''Site administration > Plugins > Search > Solr'' enable the checkbox '''Enable file indexing'''
# Set '''Maximum file size to index (kB)''' to some value - the default is '''2097152''' (2GB)
#* Files larger than this limit will not be sent for Solr for indexing, but the file name will still be indexed.


===Como instalar Solr===
===Como instalar Solr===
Línea 35: Línea 83:


==== Linux (Debian/Ubuntu) ====
==== Linux (Debian/Ubuntu) ====
 
Con PHP5.x
     sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev
     sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev
     sudo apt-get install php5-dev
     sudo apt-get install php5-dev
     sudo apt-get install php-pear
     sudo apt-get install php-pear
     sudo pecl install solr
     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/apache2/conf.d/solr.ini"
     sudo sh -c "echo 'extension=solr.so' > /etc/php5/cli/conf.d/solr.ini"
     sudo sh -c "echo 'extension=solr.so' > /etc/php5/cli/conf.d/solr.ini"
    sudo service apache2 restart
Con PHP 7
    sudo apt-get install libpcre3-dev libxml2-dev libcurl4-openssl-dev
    sudo apt-get install php7.0-dev
    sudo apt-get install php-pear
    sudo pecl install solr
    sudo sh -c "echo 'extension=solr.so' > /etc/php/7.0/apache2/conf.d/solr.ini"
    sudo sh -c "echo 'extension=solr.so' > /etc/php/7.0/cli/conf.d/solr.ini"
    sudo service apache2 restart


==== OSX using macports ====
==== Linux (Redhat/Centos 6) ====
Enable/Install Remi repo, and...
yum install php-pecl-solr2
 
==== OSX usando macports ====


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


==== OSX using homebrew ====
==== OSX usando homebrew ====


     brew install homebrew/php/php56-solr
     brew install homebrew/php/php56-solr
Línea 57: Línea 117:
Install the pecl package as usual. (This has not yet been tested.)
Install the pecl package as usual. (This has not yet been tested.)


==== El servidor Solr ====
==== 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.  
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.
Solr 7 is not currently supported as the field type 'int' has been removed. 
 
Note that for medium/large sites you may need to increase maxBooleanClauses setting. In [https://tracker.moodle.org/browse/MDL-54992 MDL-54992] we are working on an alternative way to query the server.
 
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. If wget gives an error, check  http://www-us.apache.org/dist/lucene/solr and update SOLRVERSION


     #!/bin/bash
     #!/bin/bash
     set -e
     set -e
     SOLRVERSION=5.4.1
     SOLRVERSION=5.5.5
     SOLRNAME=solr-$SOLRVERSION
     SOLRNAME=solr-$SOLRVERSION
     SOLRTAR=$SOLRNAME'.tgz'
     SOLRTAR=$SOLRNAME'.tgz'
Línea 74: Línea 138:
     fi
     fi
     if [ ! -f $SOLRTAR ]; then
     if [ ! -f $SOLRTAR ]; then
         wget http://apache.mirror.digitalpacific.com.au/lucene/solr/$SOLRVERSION/$SOLRTAR
         wget http://www-us.apache.org/dist/lucene/solr/$SOLRVERSION/$SOLRTAR
     fi
     fi
     tar -xvzf $SOLRTAR
     tar -xvzf $SOLRTAR
Línea 84: Línea 148:
     # - "/yourdirectory/solrdir/bin/solr stop" from CLI to stop the server.
     # - "/yourdirectory/solrdir/bin/solr stop" from CLI to stop the server.


=====Solr 4 schema setup=====
=====Configuración del esquema Solr 5/6=====
 
Moodle will use Solr's managed schema interface to install the required fields. You will be directed on what to do from the Manage global search page.
 
For very large or busy sites, it is recommended that you manually remove the '''_text_''' field, and associated copy directive from, the default Solr schema. This field is not used by Moodle, and will significantly slow indexing, and increase the size of the resulting Solr core.
 
=====Configuración del esquema  Solr 4=====


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:
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:
Línea 207: Línea 277:
|}
|}


=====Consideraciones sobre Memoria e Indización de archivos=====
For large sites, and particularly if you are using the File indexing feature, it's a good idea to give Solr plenty of memory, eg aound 10-20GB. To start Solr with more than its default 512MB of RAM, use the ''-m'' option:
solr start -m 12g
See the documents for your version of Solr on how to increases memory when Solr is started automatically.
=====Too many boolean clauses error=====
Because of the way Moodle handles permissions for searches, if you have non-admin users with access to a large number of activities (>1000), they may an error similar to the following:
    The query you provided could not be parsed by the search engine: org.apache.solr.search.SyntaxError: Cannot parse
    ...
    too many boolean clauses
To correct this, you need to increase the ''maxBooleanClauses'' setting in your Solr core. The setting is located in ''corename/conf/solrconfig.xml''.
This important note is included in the config file:
    ** WARNING **
   
    This option actually modifies a global Lucene property that
    will affect all SolrCores.  If multiple solrconfig.xml files
    disagree on this property, the value at any given moment will
    be based on the last SolrCore to be initialized.
This means that for consistent behavior you should update this value for all cores in the Solr server.
====Comando para instalar Servidor Solr en Centos 7====
First of all install java (openjdk)
yum install java-1.8.0-openjdk
Add user for solr
adduser solr
Download solr server, find latest here : http://lucene.apache.org/solr/mirrors-solr-latest-redir.html, from the list there download latest solr-[version].tgz
Here is the list of needed commands (note that latest solr is suggested, change command to appropriate version)
cd /opt
wget http://www-eu.apache.org/dist/lucene/solr/6.1.0/solr-6.1.0.tgz
tar zxvf solr-6.1.0.tgz
cp solr-6.1.0/bin/install_solr_service.sh .
rm -rf solr-6.1.0
./install_solr_service.sh solr-6.1.0.tgz
chkconfig solr on
Create the index
su - solr -c "/opt/solr/bin/solr create_core -c moodle"
Then go to your Moodle and set index name as created (moodle)
==Vea también==
Discusiones en foro:
* [https://moodle.org/mod/forum/discuss.php?d=334938 Global search doesn't index plugins?]
* [https://moodle.org/mod/forum/discuss.php?d=339819 Global Search on Moodle 3.1]


[[en:Global_search]]
[[en:Global_search]]
[[de:Globale Suche]]

Revisión del 18:17 21 may 2018

Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!.     ( y otras páginas pendientes)

Esta página necesita actualizarse con la información existente en la documentación vigente/moderna/actualizada en el idioma inglés original para Moodle. Se le sugiere al lector que consulte la página original en idioma inglés cuyo enlace está al fondo de esta página. y que, por favor, actualice esta información y quite la plantilla {{Actualizar}} cuando haya terminado.     (otras páginas pendientes de actualizar)


¡Nueva característica
en Moodle 3.1!

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 en Características avanzadas y entonces, desde la página para Gestionar Búsqueda Global , debe seleccionarse el motor de búsqueda.

¡Nueva característica
en Moodle 3.5!


La Búsqueda Global Simple proporciona características de búsqueda global sin la necesidad de instalar un motor de búsqueda externo.

(Pronto se podrá un enlace hacia un nuevo Screencast ..)

Cuando está habilitada la Búsqueda Global, una caja de búsqueda está entonces disponible junto al menú del usuario.

Buscando en el sitio (cuando está habilitada la búsqueda global)

¿Qué puedo buscar?

Usted puede buscar sus cursos, información de actividades y algunos contenidos de actividades tales como publicaciones en foros, capítulos de libros, entradas del glosario o páginas de Wikis colaborativos.

¡Nueva característica
en Moodle 3.4!

El contenido de un Bloque HTML pueede ser buscado y, si el administrador habilita la configuración de "Buscar todos los cursos" entonces los cursos que sean visibles a usuarios pero en los cuales no estén inscritos (matriculados) también pueden ser buscados. (Estos cursos son cursos con acceeso de invitados o si el usuario tiene la capacidad de ver todos los cursos).

¿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

Características de la consulta de búsqueda Solr

You can improve your search using any of the following search query features:

  • Specifying the field to be searched by prefixing the search query with 'title:', 'content:', 'name:', or 'intro:' e.g.'title:news' returns results with the word 'news' in the title
  • Boolean operators ('AND', 'OR', 'NOT') to combine or exclude keywords
  • Wildcard characters ('*' or '?' ) to represent characters in the search query
  • Proximity searches ('~') e.g. mood~2 returns "moodle" (2 letters away from "mood"), Moodle Australia~3 returns results containing "Moodle HQ in Perth, Australia" (the queried terms were within 3 words of each other)
  • Boosting terms ('^') to boost certain words or phrases e.g. "Perth Australia"^5 "Australia" will return results with the phrase "Perth Australia" as more relevant.

Nuevo en Moodle 3.5 : Nuevos campos ahora facilitan el filtrar por Id del usuario y buscar por grupo.

Note: The above features are only available when using the Solr search engine.

¿Cómo se configura?

Nota: La búsqueda global necesita un motor de búsqueda. Las instrucciones para instala la extensión Solr de PHP y para instalar un servidor Solr están debajo. Vea los Developer docs on Search engine plugins si desea escribir sus propias extensiones. Se le recomienda que primeramente configure todo, que indice (indexe) los contenidos del sitio y solamente entonces habilite la Búsqueda Global.


Configurando Solr

Configuración general

  1. 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
  2. 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)
  3. If you are using Solr with SSL encryption, you will need to configure Moodle as such. This is important if solr is not installed in the web server server.
    1. You will need a separate key file and cacert file, both in pem format, located on your server Moodle, and readable by the PHP process.
    2. Go to Site administration > Plugins > Search > Solr
    3. Set Secure mode to Yes
    4. SSL certificate to /path/to/certs/solr-ssl.cacert.pem
    5. SSL key to /path/to/certs/solr-ssl.key.pem
    6. SSL key Password to The password used to lock the SSL Key
    7. SSL CA certificates name to /path/to/certs/solr-ssl.cacert.pem
  4. Index your site's data going to Site administration > Reports > Global search info or from the CLI running php admin/tool/task/cli/schedule_task.php --execute="\core\task\search_index_task" script, being the CLI script the recommended option for big sites.
  5. Enable Global search in Site administration > Advanced features

Indizado de Archivos

Solr has the ability to index the contents of files, such as File resources and attachments to Forum posts. This uses the Tika engine which comes bundled with Solr. To enable this feature:

  1. In Site administration > Plugins > Search > Solr enable the checkbox Enable file indexing
  2. Set Maximum file size to index (kB) to some value - the default is 2097152 (2GB)
    • Files larger than this limit will not be sent for Solr for indexing, but the file name will still be indexed.

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)

Con PHP5.x

   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 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"
   sudo service apache2 restart

Con PHP 7

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

Linux (Redhat/Centos 6)

Enable/Install Remi repo, and...

yum install php-pecl-solr2

OSX usando macports

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

OSX usando 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.

Solr 7 is not currently supported as the field type 'int' has been removed.

Note that for medium/large sites you may need to increase maxBooleanClauses setting. In [https://tracker.moodle.org/browse/MDL-54992 MDL-54992] we are working on an alternative way to query the server.

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. If wget gives an error, check http://www-us.apache.org/dist/lucene/solr and update SOLRVERSION

   #!/bin/bash
   set -e
   SOLRVERSION=5.5.5
   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://www-us.apache.org/dist/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.
Configuración del esquema Solr 5/6

Moodle will use Solr's managed schema interface to install the required fields. You will be directed on what to do from the Manage global search page.

For very large or busy sites, it is recommended that you manually remove the _text_ field, and associated copy directive from, the default Solr schema. This field is not used by Moodle, and will significantly slow indexing, and increase the size of the resulting Solr core.

Configuración del esquema Solr 4

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
Consideraciones sobre Memoria e Indización de archivos

For large sites, and particularly if you are using the File indexing feature, it's a good idea to give Solr plenty of memory, eg aound 10-20GB. To start Solr with more than its default 512MB of RAM, use the -m option:

solr start -m 12g

See the documents for your version of Solr on how to increases memory when Solr is started automatically.


Too many boolean clauses error

Because of the way Moodle handles permissions for searches, if you have non-admin users with access to a large number of activities (>1000), they may an error similar to the following:

   The query you provided could not be parsed by the search engine: org.apache.solr.search.SyntaxError: Cannot parse 
   ...
   too many boolean clauses

To correct this, you need to increase the maxBooleanClauses setting in your Solr core. The setting is located in corename/conf/solrconfig.xml.

This important note is included in the config file:

   ** WARNING **
   
   This option actually modifies a global Lucene property that
   will affect all SolrCores.  If multiple solrconfig.xml files
   disagree on this property, the value at any given moment will
   be based on the last SolrCore to be initialized.

This means that for consistent behavior you should update this value for all cores in the Solr server.

Comando para instalar Servidor Solr en Centos 7

First of all install java (openjdk)

yum install java-1.8.0-openjdk

Add user for solr

adduser solr

Download solr server, find latest here : http://lucene.apache.org/solr/mirrors-solr-latest-redir.html, from the list there download latest solr-[version].tgz

Here is the list of needed commands (note that latest solr is suggested, change command to appropriate version)

cd /opt
wget http://www-eu.apache.org/dist/lucene/solr/6.1.0/solr-6.1.0.tgz
tar zxvf solr-6.1.0.tgz
cp solr-6.1.0/bin/install_solr_service.sh .
rm -rf solr-6.1.0
./install_solr_service.sh solr-6.1.0.tgz
chkconfig solr on

Create the index

su - solr -c "/opt/solr/bin/solr create_core -c moodle"

Then go to your Moodle and set index name as created (moodle)


Vea también

Discusiones en foro: