Herramientas de usuario

Herramientas del sitio


notas:2010_apache_solr

Experiencias con Apache Solr

La motivación para encarar esto justo hoy viene de: Faceted, Work-Centric Moving Image Discovery Interface Demonstration. A eso se suma una vieja curiosidad por saber algo sobre Solr, dado su uso en aplicaciones como VuFind y Kochief (ex Fac-Back-OPAC).

Tutorial

Getting Started

$ cd ~/software/A/apache-solr-1.4.1/example/
$ java -jar start.jar
2010-10-19 14:54:27.400::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2010-10-19 14:54:27.925::INFO:  jetty-6.1.3

...

Oct 19, 2010 2:54:31 PM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@ff8c74 main
2010-10-19 14:54:31.936::INFO:  Started SocketConnector @ 0.0.0.0:8983

Para verificar que el servidor está andando accedo a:

  http://localhost:8983/solr/admin/

Indexing Data

Abro otra terminal.

cd ~/software/A/apache-solr-1.4.1/example/exampledocs
$ java -jar post.jar solr.xml monitor.xml
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8, other encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file solr.xml
SimplePostTool: POSTing file monitor.xml
SimplePostTool: COMMITting Solr index changes..
$ java -jar post.jar *.xml
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8, other encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file hd.xml
SimplePostTool: POSTing file ipod_other.xml
SimplePostTool: POSTing file ipod_video.xml
SimplePostTool: POSTing file mem.xml
SimplePostTool: POSTing file monitor2.xml
SimplePostTool: POSTing file monitor.xml
SimplePostTool: POSTing file mp500.xml
SimplePostTool: POSTing file payload.xml
SimplePostTool: POSTing file sd500.xml
SimplePostTool: POSTing file solr.xml
SimplePostTool: POSTing file utf8-example.xml
SimplePostTool: POSTing file vidcard.xml
SimplePostTool: COMMITting Solr index changes..

Deleting Data

$ java -Ddata=args -Dcommit=no -jar post.jar "<delete><id>SP2514N</id></delete>"
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8, other encodings are not currently supported
SimplePostTool: POSTing args to http://localhost:8983/solr/update..
$ java -jar post.jar
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8, other encodings are not currently supported
SimplePostTool: COMMITting Solr index changes..
$ java -Ddata=args -jar post.jar "<delete><query>name:DDR</query></delete>"
SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8, other encodings are not currently supported
SimplePostTool: POSTing args to http://localhost:8983/solr/update..
SimplePostTool: COMMITting Solr index changes..
java -jar post.jar *.xml

Documentos

Interfaces Solr/Python

  • collective.solr: collective.solr is an approach to integrate the Solr search engine with Plone. It provides an indexing processor for use with collective.indexing as well as a search API similar to the standard portal catalog. GenericSetup profiles can be applied to set up content indexing in Solr and use it as a backend for Plone's site and live search facilities.
  • solrpy: solrpy is a Python client for Solr, an enterprise search server built on top of Lucene. solrpy allows you to add documents to a Solr instance, and then to perform queries and gather search results from Solr using Python.

Interfaces Solr/Django

notas/2010_apache_solr.txt · Última modificación: por 127.0.0.1