Fork me on GitHub

Solr

Introduction

Plugin to change the default search engine in Lutece (based on lucene) by Solr server.

Its major features include powerful full-text search, hit highlighting, faceted search, auto-suggest, spelling suggestions ...

Install

Download Solr 1.4 from source : http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0

Apply SOLR-64 and SOLR-792

Re-index all periodically

To re-index all content from scratch, one can use the following JSP which can be call from a CRON (ex: every weekend)

<html>
<body>
<div>
<%= fr.paris.lutece.plugins.search.solr.indexer.SolrIndexerService.processDel(  ) %>
</div>
<pre>
<%= fr.paris.lutece.plugins.search.solr.indexer.SolrIndexerService.processIndexing( true ) %>
</pre>
</body>
</html>

XPage search-solr configuration

Different configurations can be applied to the xpage by using the query parameter "conf=XXX". Configurations have the following parameters:

  • mapping: display results on a map
  • fq: apply extra filters on the server
  • template: set the freemarker template to use instead of the default "skin/search/solr_search_results.html"
  • addonBeans.X: use spring beans implementing the ISolrSearchAppAddOn interface to add data to the freemarker model. Multiple beans can be used by specifying multiple values for this parameter with different values of "X" (by convention, "0", "1" ...)

To add or edit configuration, insert datastore keys in the form: solr.app.conf.XXX.YYY where XXX is the name of the configuration (the query parameter of the xpage), and YYY the parameter the previous list to modify. By convention, also add a key "solr.app.conf.XXX.installed" with the value "true".