Extension:SolrStore

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
SolrStore

Release status: beta

SMWsolr-small.png
Implementation User interface, Search
Description Mediawiki Search with Apache Solr
Author(s) Simon Bachenberg, Stephan Gambke, Sascha Schüller
Last version 0.6 (2011-12-16)
MediaWiki 1.16+
PHP 5
Database changes no
License Apache 2.0
Download
log
Parameters

$wgSolrUrl,
$wgSolrFields,
$wgSolrShowRelated,
$wgSolrDebug,
$wgSolrTalker

Check usage (experimental)

Extension SolrStore is a new provider of searches for Semantic Mediawiki. You can search your semantic properties with the power of a fulltext search engine (lucene), by defining custom search forms.

Contents

[edit] Requirements

Having Semantic MediaWiki installed is a precondition for the SolrStore extension: the code will not work without it.

You need the Following pieces of Software:


[edit] Installation

At first you need to install Solr. After that copy the Solr Configuration files from /SolrStore/solr-example/core0 to one of your Solr cores and restart your Tomcat.

To install this extension, add the following to LocalSettings.php:

include_once("$IP/extensions/SolrStore/SolrStore.php");
$smwgDefaultStore = "SolrConnectorStore";
 
#url to your solr
$wgSolrUrl = 'http://localhost:8080/solr/sofis';


[edit] Configuration parameters

#fieldSets for Field-based Searching
$wgSolrFields = array(
    new SolrSearchFieldSet('Projects', 'Title; Persons; id', 'Title; Persons; Project Id', ' AND category:Project'),
    new SolrSearchFieldSet('<Name of FieldSet>', '<Semantic Properties>', '<Label>', '<Additional Query Parameters>')
);


[edit] Template System

  • If you prefer to use other template for example: "FIS Template"
  • add to LocalSettings.php
# define Template
$wgSolrTemplate = "_FIS";


[edit] create template

  • Conditions to use:
  1. create the file in: ./extensions/SolrStore/templates
  2. make a copy of the existing SolrSearchTemplate_Standart.php
  3. rename the file to: SolrSearchTemplate_NEWNAME.php
  4. rename the class to: SolrSearchTemplate_NEWNAME
  5. add to LocalSettings.php:
# define Template
$wgSolrTemplate = "_NEWNAME";


For faster indexing use "maintenance/runJobs.php" and run some Jobs.

[edit] Demo

If you want to try our Search visit:

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox