DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:indexer_text_prepare

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
devel:event:indexer_text_prepare [2011-03-19 20:04] – [INDEXER_TEXT_PREPARE] andidevel:event:indexer_text_prepare [2011-03-20 00:25] – The tokenizer also parses search terms TomNHarris
Line 8: Line 8:
 ---- ----
  
-This event is signalled by [[xref>tokenizer()]] in [[xref>inc/indexer.php]] when a page is about to be split into words, handlers can use it to modify the behaviour how words are detected. The default action uses a regular expression to separate Asian characters into single words.+This event is signalled by [[xref>tokenizer()]] in [[xref>inc/indexer.php]] when a page or search term is about to be split into words, handlers can use it to modify the behaviour how words are detected. The default action uses a regular expression to separate Asian characters into single words.
  
 If you intercept this event you should also add your plugin to the index version through using the [[devel:event:INDEXER_VERSION_GET]] event. If you intercept this event you should also add your plugin to the index version through using the [[devel:event:INDEXER_VERSION_GET]] event.
Line 14: Line 14:
 ===== Passed Data ===== ===== Passed Data =====
  
-$data contains the raw page text as a string before being split into words. Your plugin should modify the text in a way that words are separated by spaces or newlines.+$data contains a string before being split into words. The source of the string will be the text of a page, or an individual term of a search query. Your plugin should modify the text in a way that words are separated by spaces or newlines.
  
 ===== Plugins handling this event ===== ===== Plugins handling this event =====
Line 24: Line 24:
 ===== See also ===== ===== See also =====
  
 +  * [[:search]]
   * [[devel:Action Plugins]]   * [[devel:Action Plugins]]
   * [[devel:Events]]   * [[devel:Events]]
devel/event/indexer_text_prepare.txt · Last modified: 2018-12-08 15:41 by torpedo

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki