DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:asiansearch

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin:asiansearch [2009-10-08 16:49]
laynee tag cleanup
plugin:asiansearch [2018-05-30 20:41] (current)
Klap-in
Line 3: Line 3:
  
 ---- plugin ---- ---- plugin ----
-description: ​Manipulates a search query for a better search experience in Asian languages+description: ​Provides ​a better search experience in Asian languages
 author ​    : Kazutaka Miyasaka author ​    : Kazutaka Miyasaka
 email      : kazmiya@gmail.com email      : kazmiya@gmail.com
 type       : action type       : action
-lastupdate : 2009-09-06 +lastupdate : 2011-04-26 
-compatible : 2009-02-14+compatible : 2009-02-14, 2009-12-25, 2010-11-07, 2011-05-25
 depends ​   :  depends ​   : 
-conflicts ​ : +conflicts ​ : pageredirect
 similar ​   :  similar ​   : 
-tags       : language, search+tags       : ​!obsolete, ​language, search 
 + 
 +downloadurl:​ https://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch/​zipball/​master 
 +bugtracker : https://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch/​issues 
 +sourcerepo : https://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch 
 +donationurl: ​
 ---- ----
  
-This plugin ​provides a better search experience in Asian languages ​by manipulating a search queryNo re-indexing is required.+| :!: **You don't need to install this plugin ​on DokuWiki 2011-04 "​Rincewind"​.** As of Rincewind, all searching problems with Asian languages ​seem solvedIf you have already installed this plugin, you are safe to uninstall it|
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download ​and install the plugin using the [[:plugin:plugin|Plugin ​Manager]] ​using the following URL. Refer to [[:​Plugins]] on how to install plugins manually.+Search ​and install the plugin using the [[plugin:extension|Extension ​Manager]]. ​
  
-^ Download ​ | [[http://​cloud.github.com/​downloads/​kazmiya/​dokuwiki-plugin-asiansearch/​dokuwiki-plugin-asiansearch.zip|dokuwiki-plugin-asiansearch.zip]] +Alternatively,​ refer to [[:Plugins]] on how to install plugins manuallyIf you are manually installing, you need to rename the extracted directory to "asiansearch"​. ​
-^ GitHub URL  | http://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch ​|+
  
-===== History =====+**Changelog**:​
  
-  * 2009-09-06 -- Initial release+{{rss>​https://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch/​commits/​master.atom 5 date 1d}}
  
 ===== Overview ===== ===== Overview =====
  
-DokuWiki has a full-text search function which now also supports Asian languages. However, searching Asian language texts still has some problems. The problems are that: +DokuWiki has a full-text search function which now also supports Asian languages. However, searching Asian language texts still has some problems.
- +
-  * Search result highlights are a bit too fragmented +
-  * An ideographic space (U+3000) in a search query is treated not as a search term separator, but as a character itself +
- +
-This plugin solves these problems by manipulating a search query, never making changes to your DokuWiki'​s search index files. +
- +
-===== Examples ===== +
- +
-Let's assume that your DokuWiki has a page whose text is: +
- +
-  京都から東海道新幹線で東に向かうと、東京に着いた。 +
- +
-==== Search Result Highlights ==== +
- +
-**Search Query:** ''​[ 東京 ]''​ +
- +
-^ ^ Search Result/​Highlights ​ ^ Impressions ​ ^ +
-| Plain Dokuwiki | __**京**__都から__**東**__海道新幹線で__**東**__に向かうと、__**東京**__に着いた。 | Too fragmented. Noisy. | +
-| With this plugin | 京都から東海道新幹線で東に向かうと、__**東京**__に着いた。 | Good. | +
- +
-==== Ideographic Spaces ==== +
- +
-**Search Query:** ''​[ 新幹線 東京 ]''​ +
- +
-^ ^ Search Result/​Highlights ​ ^ Impressions ​ ^ +
-| Plain DokuWiki | :!: No Hits!  | Why? | +
-| With this plugin | 京都から東海道__**新幹線**__で東に向かうと、__**東京**__に着いた。 | As I expected. | +
- +
-Note that the space between ''​%%"​新幹線"​%%''​ and ''​%%"​東京"​%%''​ is not a normal space but an ideographic space (U+3000). In a plain DokuWiki, the search query ''​%%[ 新幹線 東京 ]%%''​ is parsed as a monolithic ''​%%"​新幹線 東京"​%%'',​ not as separated ''​%%"​新幹線"​%%''​ and ''​%%"​東京"​%%''​. +
- +
-===== How It Works ===== +
- +
-This plugin manipulates a search query by using the following steps: +
- +
-  - Puts "​phrases"​ aside not to make any changes within preexistent phrases +
-  - Replaces ideographic spaces with normal spaces +
-  - Makes a phrase for each successive Asian character +
- +
-Below is a example of complicated query. +
- +
-^ Original Query  | ''​%%[ dokuwiki "​asiansearch plugin"​ プラグイン 插件 플러그인 "​検 索"​ ]%%''​ | +
-^ Manipulated Query  | ''​%%[ dokuwiki "​asiansearch plugin"​ "​プラグイン"​ "​插件"​ "​플러그인"​ "​検 索"​ ]%%''​ | +
- +
-You can see that Asian characters are quoted, ideographic spaces are replaced with normal spaces, and nothing is changed within preexistent phrases. +
- +
-By default, DokuWiki treats each Asian character as a "​word",​ and additionally,​ each successive Asian character as a "​phrase"​. DokuWiki highlights both "​words"​ and "​phrases"​ in search results. Preprocessing a search query in above way reduces "​words",​ resulting in neat highlights of your search results. +
- +
-By checking the returned values of ''​[[xref>​ft_queryParser]]'',​ you can see how DokuWiki parsed these queries.+
  
-**Original Query:**+The problems are that:
  
-  ​'​phrases':​ +  ​* **DokuWiki 2009-02-14** 
-    ​'​asiansearch plugin'​ +    ​* Search result highlightings are a bit too fragmented 
-    ​- '​検 索'​ +    ​* An ideographic space (U+3000) in a search query is treated not as a search term separator, but as a character itself 
-    ​- '​ プラグイン 插件 플러그인'​ +  ​* **DokuWiki 2010-11-07 "​Anteater"​** 
-  ​'​words':​ +    ​* No search result snippet appears when searched with Asian words
-    ​'​dokuwiki'​ +
-    ​'​プ'​ +
-    ​- '​ラ'​ +
-    - '​グ'​ +
-    - '​イ'​ +
-    - '​ン'​ +
-    - '​插'​ +
-    - '​件'​ +
-    - '​플'​ +
-    - '​러'​ +
-    - '​그'​ +
-    - '​인'​+
  
-**Manipulated Query:**+This plugin solves these problems.
  
-  '​phrases':​ +===== Configuration =====
-    - '​asiansearch plugin'​ +
-    - '​プラグイン'​ +
-    - '​插件'​ +
-    - '​플러그인'​ +
-    - '​検 索'​ +
-  '​words':​ +
-    - '​dokuwiki'​+
  
-===== Discussion =====+There are no configuration options for this plugin.
  
-The problem this plugin is trying to solve looks like a bug  to me. DokuWiki should handle Asian queries correctly out of the box. Could you please open a bug report to get this solved in core?  --- //​[[andi@splitbrain.org|Andreas Gohr]] 2009/09/06 23:05//+===== Feedback =====
  
-  * OK, I'll open it laterThanks Andi --- //​[[kazmiya@gmail.com|Kazutaka Miyasaka]] 2009/09/07 05:10//+Any feedback is welcomePlease use the [[https://​github.com/​kazmiya/​dokuwiki-plugin-asiansearch/issues|Issue Tracker]] to send your feedback.
  
plugin/asiansearch.1255013394.txt.gz · Last modified: 2009-10-08 16:49 by laynee