[前][次][番号順一覧][スレッド一覧]

mysql:5411

From: "KAWAI,Takanori" <"KAWAI,Takanori" <GCD00051@xxxxxxxxxx>>
Date: Fri, 26 Apr 2002 10:52:49 +0900
Subject: [mysql 05411] Re: Full-text Search

全文検索に萌えている(?)川合孝典です。

----- Original Message -----
From: <moeru@xxxxxxxxxx>
To: <ml@xxxxxxxxxx>
Sent: Friday, April 26, 2002 9:47 AM
Subject: [mysql 05410] Re: Full-text Search


>
> 2002/04/26 07:44:13 +0900に"KAWAI,Takanori" <GCD00051@xxxxxxxxxx>さんに頂
いた
> 「[mysql 05408] Re: Full-text Search」への返事です。
>
> モエルです。
(中略)
> 全件表示
> http://www.hippo2000.info/cgi-bin/myfull/fullTst.pl
>
> を検索させるのに
>
> 検索文字列をChaSenで分解して結果を表示ってやってるんですよね?
>
> MATCH(bodySrch) AGAINST(?)って使ったこと無いので
> まだ理解できてないんですが
>
> FullText Searchって
> where keyword = A or keyword = B or keyword = C
> と同じことをやってますか?
ちゃいます。詳しくは

12 MySQL Full-text Search
http://www.mysql.gr.jp/jpdoc/3.23/manual.ja_Fulltext_Search.html#Fulltext_Se
arch

にある通りなのですが、ちょっと長いのですが引用すると
<引用>
The function MATCH matches a natural language query AGAINST a
text collection (which is simply the set of columns covered by a
FULLTEXT index). For every row in a table it returns relevance - a
similarity measure between the text in that row (in the columns that
are part of the collection) and the query. When it is used in a WHERE
clause (see example above) the rows returned are automatically sorted
with relevance decreasing. Relevance is a non-negative floating-point
number. Zero relevance means no similarity. Relevance is computed
based on the number of words in the row, the number of unique words
in that row, the total number of words in the collection, and the number
 of documents (rows) that contain a particular word.
</引用>
MATCHで指定された列の内容のAGAINSTで指定された文字列に対して
Relevance(妥当性、類似性)を計算することによって取得してくるようです。
計算方法はその内容の単語の数や指定された単語が含まれる行の
数に依存するようです。

> ぼくが欲しいとしたら、中間一致の方だったりします。
>
> なので、最初思ったのは、本文をChaSenで分解して
> FullText Search用のテーブルを作って格納しておき
> それを検索させるのかな?って思ってました。。
MySQLのFull-text Searchということでは、ここで示している
MATCH ... AGAINSTを使う方法というだと思っています。
で、現在、私が使っているサーバーのMATCH...の値の出方から
するとORにつなぎに近いのかなぁといった感じです。
12.2 New Features of Full-text Search to Appear in MySQL 4.0
によれば、4.0ではもうちょっと限定できそうな気もしますが。

ただ全文検索=MySQLのFull-text Searchだけではありませんし、
[mysql 05386] Re: Full-text Search にも書きましたが、要は
どんな風に検索したいかによってやり方が変わってくるでしょう。

===================================================
川合 孝典 (Hippo2000)
   DBI日本語メーリングリスト管理人、Kansai.pm所属
   kwitknr@xxxxxxxxxx GCD00051@xxxxxxxxxx
   http://member.nifty.ne.jp/hippo2000
   http://www.hippo2000.info/
「Perlを256倍使うための本 DBI編」 発売中
http://member.nifty.ne.jp/hippo2000/p256dbi/p256dbi.htm
===================================================




[前][次][番号順一覧][スレッド一覧]

      5375 2002-04-20 22:23 [<moeru@xxxxxxxxxx>  ] Full-text Search                        
      5376 2002-04-20 23:19 ┗[とみたまさひろ <tomm]                                       
      5377 2002-04-20 23:35  ┗[<moeru@xxxxxxxxxx>  ]                                     
      5378 2002-04-21 00:34   ┗[とみたまさひろ <tomm]                                   
      5379 2002-04-21 00:47    ┗[<moeru@xxxxxxxxxx>  ]                                 
      5381 2002-04-21 07:37     ┣["KAWAI,Takanori" <GC]                               
      5383 2002-04-21 11:13     ┃┗[<moeru@xxxxxxxxxx>  ]                             
      5386 2002-04-21 23:19     ┃ ┗["KAWAI,Takanori" <GC]                           
      5387 2002-04-22 00:13     ┃  ┗[<moeru@xxxxxxxxxx>  ]                         
      5401 2002-04-25 11:06     ┃   ┗["KAWAI,Takanori" <GC]                       
      5403 2002-04-25 12:14     ┃    ┗[<moeru@xxxxxxxxxx>  ]                     
      5404 2002-04-25 14:10     ┃     ┣["KAWAI,Takanori" <GC]                   
      5407 2002-04-26 01:10     ┃     ┃┣[<moeru@xxxxxxxxxx>  ]                 
      5408 2002-04-26 07:44     ┃     ┃┃┗["KAWAI,Takanori" <GC]               
      5410 2002-04-26 09:47     ┃     ┃┃ ┗[<moeru@xxxxxxxxxx>  ]             
->    5411 2002-04-26 10:52     ┃     ┃┃  ┣["KAWAI,Takanori" <GC]           
      5417 2002-04-27 00:22     ┃     ┃┃  ┃┣[<moeru@xxxxxxxxxx>  ]         
      5419 2002-04-27 12:30     ┃     ┃┃  ┃┗[Tatsuhiko Miyagawa <]         
      5421 2002-04-27 12:46     ┃     ┃┃  ┃ ┣["TOYOSHIMA, Masayuki]       
      5422 2002-04-27 13:06     ┃     ┃┃  ┃ ┃┣[Tatsuhiko Miyagawa <]     
      5423 2002-04-28 11:50     ┃     ┃┃  ┃ ┃┃┗["TOYOSHIMA, Masayuki]   
      5424 2002-04-28 18:36     ┃     ┃┃  ┃ ┃┗["KAWAI,Takanori" <GC]     
      5425 2002-04-28 18:50     ┃     ┃┃  ┃ ┗["KAWAI,Takanori" <GC]       
      5432 2002-05-05 14:58     ┃     ┃┃  ┃  ┗[<moeru@xxxxxxxxxx>  ]     
      5416 2002-04-26 20:20     ┃     ┃┃  ┗[Hidetoshi OKAWA <hid]           
      5420 2002-04-27 12:46     ┃     ┃┗[Tatsuhiko Miyagawa <]                 
      5405 2002-04-25 18:33     ┃     ┗[Hidetoshi OKAWA <hid]                   
      5382 2002-04-21 08:04     ┗[とみたまさひろ <tomm]