PerlDoc

See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


Parent package: Foswiki::Plugins
Child packages:

internal package Foswiki::Plugins::SolrPlugin

base class to hook into the foswiki core

initPlugin($topic, $web, $user) → $boolean

initialize the plugin, automatically called during the core initialization process

finishPlugin()

called when the current session is clearned up

registerIndexTopicHandler(&sub)

register a custom handler to the indexing process of a topic

registerIndexAttachmentHandler(&sub)

register a custom handler to the indexing process of an attachment

getWebHierarchy($session) → $webHierarchy

returns a singleton object for the web-hierarchy service

getSearcher($session) → $searcher

returns a singleton object of the solr search service

getIndexer($session) → $indexer

returns a singleton object of the solr indexing service

getCrawler($session, $name) → $crawler

returns a crawler object identified by the given name. Crawlers are defined in the $Foswiki::cfg{SolrPlugin}{Crawler}{$name} hash. For example:

$Foswiki::cfg{SolrPlugin}{Crawler}{files} = {
  source => 'file system',
  module => 'Foswiki::Plugins::SolrPlugin::Crawler::FileSystemCrawler',
  path => '/mnt/network', 
  excludePath => '\/\.~|\.(bak|old|swp)$|\/\.git$',
  includePath => '',
  depth => 0,
  followSymLinks => 1,
  urlTemplate => 'file://$filePath',
  throttle => 0,
};

defines a filesystem crawler. The module parameter is the only required setting, whereas the rest is free to be used by the crawler implementation itself.

indexCgi($session)

entry point for the solrindex script

searchCgi($session)

entry point for the solrsearch script

afterSaveHandler($text, $topic, $web, $error, $meta )

handler to update the solr index on every save process. Note, this handler is only called when {SolrPlugin}{EnableOnSaveUpdates} is enabled.

afterUploadHandler(\%attrHash, $meta )

handler to update the solr index on every upload. Note, this handler is only called when {SolrPlugin}{EnableOnUploadUpdates} is enabled.

afterRenameHandler( $oldWeb, $oldTopic, $oldAttachment, $newWeb, $newTopic, $newAttachment )

handler to update the solr index on every rename process. Note, this handler is only called when {SolrPlugin}{EnableOnRenameUpdates} is enabled.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding arbeitsgruppe.ch? Send feedback