Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 03663abacfb5829946c324cb3e985338 > files > 453

groonga-doc-1.2.7-1.fc14.x86_64.rpm




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>5.1. はじめに &mdash; groonga v1.2.6ドキュメント</title>
    
    <link rel="stylesheet" href="../_static/groonga.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.2.6',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/translations.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="groonga v1.2.6ドキュメント" href="../index.html" />
    <link rel="up" title="5. サジェスト" href="../suggest.html" />
    <link rel="next" title="5.2. チュートリアル" href="tutorial.html" />
    <link rel="prev" title="5. サジェスト" href="../suggest.html" /> 
  </head>
  <body>
<div class="header">
  <h1 class="title">
    <a id="top-link" href="../index.html">
      <span class="project">groonga</span>
      <span class="separator">-</span>
      <span class="description">オープンソースのカラムストア機能付き全文検索エンジン</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../en/html/suggest/introduction.html"><img src="../_static/us.png" alt="English"></a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>ナビゲーション</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="総合索引"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="tutorial.html" title="5.2. チュートリアル"
             accesskey="N">次へ</a> |</li>
        <li class="right" >
          <a href="../suggest.html" title="5. サジェスト"
             accesskey="P">前へ</a> |</li>
        <li><a href="../index.html">groonga v1.2.6ドキュメント</a> &raquo;</li>
          <li><a href="../suggest.html" accesskey="U">5. サジェスト</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="introduction">
<h1>5.1. はじめに<a class="headerlink" href="#introduction" title="このヘッドラインへのパーマリンク">¶</a></h1>
<p>groongaのサジェスト機能は以下の機能を提供します。:</p>
<ul class="simple">
<li>補完</li>
<li>補正</li>
<li>提案</li>
</ul>
<div class="section" id="completion">
<h2>5.1.1. 補完<a class="headerlink" href="#completion" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>補完はユーザの入力を支援します。ユーザが単語の一部分のみしか入力していないときに、登録済みの語の中から補完候補の語を返します。</p>
<p>例えば、以下が登録済みの語とします。:</p>
<ul class="simple">
<li>&quot;groonga&quot;</li>
<li>&quot;complete&quot;</li>
<li>&quot;correction&quot;</li>
<li>&quot;suggest&quot;</li>
</ul>
<p>ユーザが&quot;co&quot;と入力したとき、&quot;complete&quot;と&quot;correction&quot;を補完候補として返します。これはどちらも&quot;co&quot;で始まっているからです。</p>
<p>ユーザが&quot;sug&quot;と入力したとき、&quot;suggest&quot;を返します。これは&quot;suggest&quot;が&quot;sug&quot;から始まっているからです。</p>
<p>ユーザが&quot;ab&quot;と入力したときは何も返しません。これは&quot;ab&quot;から始まる語が1つも登録されていないからです。</p>
</div>
<div class="section" id="correction">
<h2>5.1.2. 補正<a class="headerlink" href="#correction" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>修正もユーザの入力を支援します。ユーザが間違った語を入力したときに登録済みの修正ペアの中から修正された語を返します。</p>
<p>例えば、以下のような修正ペアが登録されていたとします。</p>
<table border="1" class="docutils">
<colgroup>
<col width="46%" />
<col width="54%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">間違った語</th>
<th class="head">正しい語</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>grroonga
gronga
gronnga</td>
<td>groonga
groonga
groonga</td>
</tr>
</tbody>
</table>
<p>ユーザが&quot;gronga&quot;と入力したとき、&quot;groonga&quot;を返します。これは、&quot;gronga&quot;が「間違った語」にあり、対応する「正しい語」カラムの値が&quot;groonga&quot;だからです。</p>
<p>ユーザが&quot;roonga&quot;と入力したときは何も返しません。これは&quot;roonga&quot;が「間違った語」カラムにないからです。</p>
</div>
<div class="section" id="suggestion">
<h2>5.1.3. 提案<a class="headerlink" href="#suggestion" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>提案は、たくさんの文書が見つかったときに、ユーザがさらに絞り込むことを支援します。ユーザがクエリを入力したとき、登録済みの関連クエリペアから追加のキーワードを選び、追加のキーワードを含んだ新しいクエリを返します。</p>
<p>例えば、以下の関連クエリペアが登録されているとします。:</p>
<table border="1" class="docutils">
<colgroup>
<col width="52%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">キーワード</th>
<th class="head">関連クエリ</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>groonga</td>
<td>groonga search engine</td>
</tr>
<tr class="row-odd"><td>search</td>
<td>Google search</td>
</tr>
<tr class="row-even"><td>speed</td>
<td>groonga speed</td>
</tr>
</tbody>
</table>
<p>ユーザが&quot;groonga&quot;と入力したとき、&quot;groonga search engine&quot;を返します。これは、&quot;groonga&quot;が「キーワード」カラムの値にあり、対応する「関連クエリ」カラムの値が&quot;groonga search engine&quot;だからです。</p>
<p>ユーザが&quot;MySQL&quot;と入力したときは何も返しません。これは&quot;MySQL&quot;が「キーワード」カラムにないからです。</p>
</div>
<div class="section" id="learning">
<h2>5.1.4. 学習<a class="headerlink" href="#learning" title="このヘッドラインへのパーマリンク">¶</a></h2>
<p>サジェスト機能を使う場合は、事前に登録済みのデータを用意する必要があります。これらのデータはユーザの入力を使って登録できます。これ用にgroonga-suggest-httpdコマンドとgroonga-suggest-learnerコマンドがあります。</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">目次</a></h3>
  <ul>
<li><a class="reference internal" href="#">5.1. はじめに</a><ul>
<li><a class="reference internal" href="#completion">5.1.1. 補完</a></li>
<li><a class="reference internal" href="#correction">5.1.2. 補正</a></li>
<li><a class="reference internal" href="#suggestion">5.1.3. 提案</a></li>
<li><a class="reference internal" href="#learning">5.1.4. 学習</a></li>
</ul>
</li>
</ul>

  <h4>前のトピックへ</h4>
  <p class="topless"><a href="../suggest.html"
                        title="前の章へ">5. サジェスト</a></p>
  <h4>次のトピックへ</h4>
  <p class="topless"><a href="tutorial.html"
                        title="次の章へ">5.2. チュートリアル</a></p>
  <h3>このページ</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/suggest/introduction.txt"
           rel="nofollow">ソースコードを表示</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>クイック検索</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="検索" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    モジュール、クラス、または関数名を入力してください
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>ナビゲーション</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="総合索引"
             >索引</a></li>
        <li class="right" >
          <a href="tutorial.html" title="5.2. チュートリアル"
             >次へ</a> |</li>
        <li class="right" >
          <a href="../suggest.html" title="5. サジェスト"
             >前へ</a> |</li>
        <li><a href="../index.html">groonga v1.2.6ドキュメント</a> &raquo;</li>
          <li><a href="../suggest.html" >5. サジェスト</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2011, Brazil, Inc.
    </div>
  </body>
</html>