Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > e450e7f3d6075c4a54de19e68d38177f > files > 265

groonga-doc-3.0.5-1.fc18.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>8.3.22. select &mdash; groonga v3.0.5 documentation</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:     '3.0.5',
        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>
    <link rel="shortcut icon" href="../../_static/favicon.ico"/>
    <link rel="top" title="groonga v3.0.5 documentation" href="../../index.html" />
    <link rel="up" title="8.3. Command" href="../command.html" />
    <link rel="next" title="8.3.23. shutdown" href="shutdown.html" />
    <link rel="prev" title="8.3.21. register" href="register.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">An open-source fulltext search engine and column store.</span>
    </a>
  </h1>

  <div class="other-language-links">
    <ul>
      <li><a href="../../../../ja/html/reference/commands/select.html"><img src="../../_static/jp.png" alt="日本語">日本語版はこちら</a></li>
    </ul>
  </div>
</div>
  

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="shutdown.html" title="8.3.23. shutdown"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="register.html" title="8.3.21. register"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" accesskey="U">8.3. Command</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="select">
<h1>8.3.22. <tt class="docutils literal"><span class="pre">select</span></tt><a class="headerlink" href="#select" title="Permalink to this headline">¶</a></h1>
<div class="section" id="summary">
<h2>8.3.22.1. Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">select</span></tt> searches records that are matched to specified conditions
from a table and then outputs them.</p>
<p><tt class="docutils literal"><span class="pre">select</span></tt> is the most important command in groonga. You need to
understand <tt class="docutils literal"><span class="pre">select</span></tt> to use the full power of groonga.</p>
</div>
<div class="section" id="syntax">
<h2>8.3.22.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">select</span></tt> has many parameters. The required parameter is only
<tt class="docutils literal"><span class="pre">table</span></tt> and others are optional:</p>
<div class="highlight-none"><div class="highlight"><pre>select table
       [match_columns=null]
       [query=null]
       [filter=null]
       [scorer=null]
       [sortby=null]
       [output_columns=&quot;_id, _key, *&quot;]
       [offset=0]
       [limit=10]
       [drilldown=null]
       [drilldown_sortby=null]
       [drilldown_output_columns=null]
       [drilldown_offset=0]
       [drilldown_limit=10]
       [cache=yes]
       [match_escalation_threshold=0]
       [query_expansion=null]
       [query_flags=ALLOW_PRAGMA|ALLOW_COLUMN|ALLOW_UPDATE|ALLOW_LEADING_NOT|NONE]
       [query_expander=null]
</pre></div>
</div>
</div>
<div class="section" id="usage">
<h2>8.3.22.3. Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>Let's learn about <tt class="docutils literal"><span class="pre">select</span></tt> usage with examples. This section shows
many popular usages.</p>
<p>Here are a schema definition and sample data to show usage.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Entries TABLE_HASH_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Entries content COLUMN_SCALAR Text
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Entries n_likes COLUMN_SCALAR UInt32
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText --default_tokenizer TokenBigram
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Terms entries_key_index COLUMN_INDEX|WITH_POSITION Entries _key
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Entries
[
{&quot;_key&quot;:    &quot;The first post!&quot;,
 &quot;content&quot;: &quot;Welcome! This is my first post!&quot;,
 &quot;n_likes&quot;: 5},
{&quot;_key&quot;:    &quot;Groonga&quot;,
 &quot;content&quot;: &quot;I started to use groonga. It&#39;s very fast!&quot;,
 &quot;n_likes&quot;: 10},
{&quot;_key&quot;:    &quot;Mroonga&quot;,
 &quot;content&quot;: &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
 &quot;n_likes&quot;: 15},
{&quot;_key&quot;:    &quot;Good-bye Senna&quot;,
 &quot;content&quot;: &quot;I migrated all Senna system!&quot;,
 &quot;n_likes&quot;: 3},
{&quot;_key&quot;:    &quot;Good-bye Tritonn&quot;,
 &quot;content&quot;: &quot;I also migrated all Tritonn system!&quot;,
 &quot;n_likes&quot;: 3}
]
# [[0, 1337566253.89858, 0.000355720520019531], 5]
</pre></div>
</div>
<p>There is a table, <tt class="docutils literal"><span class="pre">Entries</span></tt>, for blog entries. An entry has title,
content and the number of likes for the entry. Title is key of
<tt class="docutils literal"><span class="pre">Entries</span></tt>. Content is value of <tt class="docutils literal"><span class="pre">Entries.content</span></tt> column. The
number of likes is value of <tt class="docutils literal"><span class="pre">Entries.n_likes</span></tt> column.</p>
<p><tt class="docutils literal"><span class="pre">Entries._key</span></tt> column and <tt class="docutils literal"><span class="pre">Entries.content</span></tt> column are indexed
using <tt class="docutils literal"><span class="pre">TokenBigram</span></tt> tokenizer. So both <tt class="docutils literal"><span class="pre">Entries._key</span></tt> and
<tt class="docutils literal"><span class="pre">Entries.content</span></tt> are fulltext search ready.</p>
<p>OK. The schema and data for examples are ready.</p>
<div class="section" id="simple-usage">
<h3>8.3.22.3.1. Simple usage<a class="headerlink" href="#simple-usage" title="Permalink to this headline">¶</a></h3>
<p>Here is the most simple usage with the above schema and data. It outputs
all records in <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>Why does the command output all records? There are two reasons. The
first reason is that the command doesn't specify any search
conditions. No search condition means all records are matched. The
second reason is that the number of all records is 5. <tt class="docutils literal"><span class="pre">select</span></tt>
command outputs 10 records at a maximum by default. There are only 5
records. It is less than 10. So the command outputs all records.</p>
</div>
<div class="section" id="search-conditions">
<h3>8.3.22.3.2. Search conditions<a class="headerlink" href="#search-conditions" title="Permalink to this headline">¶</a></h3>
<p>Search conditions are specified by <tt class="docutils literal"><span class="pre">query</span></tt> or <tt class="docutils literal"><span class="pre">filter</span></tt>. You can
also specify both <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">filter</span></tt>. It means that selected
records must be matched against both <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">filter</span></tt>.</p>
<div class="section" id="search-condition-query">
<h4>8.3.22.3.2.1. Search condition: <tt class="docutils literal"><span class="pre">query</span></tt><a class="headerlink" href="#search-condition-query" title="Permalink to this headline">¶</a></h4>
<p><tt class="docutils literal"><span class="pre">query</span></tt> is designed for search box in Web page. Imagine a search box
in google.com. You specify search conditions for <tt class="docutils literal"><span class="pre">query</span></tt> as space
separated keywords. For example, <tt class="docutils literal"><span class="pre">search</span> <span class="pre">engine</span></tt> means a matched
record should contain two words, <tt class="docutils literal"><span class="pre">search</span></tt> and <tt class="docutils literal"><span class="pre">engine</span></tt>.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">query</span></tt> parameter is used for specifying fulltext search
conditions. It can be used for non fulltext search conditions but
<tt class="docutils literal"><span class="pre">filter</span></tt> is used for the propose.</p>
<p><tt class="docutils literal"><span class="pre">query</span></tt> parameter is used with <tt class="docutils literal"><span class="pre">match_columns</span></tt> parameter when
<tt class="docutils literal"><span class="pre">query</span></tt> parameter is used for specifying fulltext search
conditions. <tt class="docutils literal"><span class="pre">match_columns</span></tt> specifies which columnes and indexes are
matched against <tt class="docutils literal"><span class="pre">query</span></tt>.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">query</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query fast
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain a word <tt class="docutils literal"><span class="pre">fast</span></tt>
in <tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p><tt class="docutils literal"><span class="pre">query</span></tt> has query syntax but its deatils aren't described here. See
<a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a> for datails.</p>
</div>
<div class="section" id="search-condition-filter">
<h4>8.3.22.3.2.2. Search condition: <tt class="docutils literal"><span class="pre">filter</span></tt><a class="headerlink" href="#search-condition-filter" title="Permalink to this headline">¶</a></h4>
<p><tt class="docutils literal"><span class="pre">filter</span></tt> is designed for complex search conditions. You specify
search conditions for <tt class="docutils literal"><span class="pre">filter</span></tt> as ECMAScript like syntax.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">filter</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter &#39;content @ &quot;fast&quot; &amp;&amp; _key == &quot;Groonga&quot;&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain a word <tt class="docutils literal"><span class="pre">fast</span></tt>
in <tt class="docutils literal"><span class="pre">content</span></tt> column value and has <tt class="docutils literal"><span class="pre">Groonga</span></tt> as <tt class="docutils literal"><span class="pre">_key</span></tt> from
<tt class="docutils literal"><span class="pre">Entries</span></tt> table. There are three operators in the command, <tt class="docutils literal"><span class="pre">&#64;</span></tt>,
<tt class="docutils literal"><span class="pre">&amp;&amp;</span></tt> and <tt class="docutils literal"><span class="pre">==</span></tt>. <tt class="docutils literal"><span class="pre">&#64;</span></tt> is fulltext search operator. <tt class="docutils literal"><span class="pre">&amp;&amp;</span></tt> and
<tt class="docutils literal"><span class="pre">==</span></tt> are the same as ECMAScript. <tt class="docutils literal"><span class="pre">&amp;&amp;</span></tt> is logical AND operator and
<tt class="docutils literal"><span class="pre">==</span></tt> is equality operator.</p>
<p><tt class="docutils literal"><span class="pre">filter</span></tt> has more operators and syntax like grouping by <tt class="docutils literal"><span class="pre">(...)</span></tt>
its deatils aren't described here. See <a class="reference internal" href="../grn_expr/script_syntax.html"><em>Script syntax</em></a> for
datails.</p>
</div>
</div>
<div class="section" id="paging">
<h3>8.3.22.3.3. Paging<a class="headerlink" href="#paging" title="Permalink to this headline">¶</a></h3>
<p>You can specify range of outputted records by <tt class="docutils literal"><span class="pre">offset</span></tt> and <tt class="docutils literal"><span class="pre">limit</span></tt>.
Here is an example to output only the 2nd record.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --offset 1 --limit 1
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">offset</span></tt> is zero-origin. <tt class="docutils literal"><span class="pre">--offset</span> <span class="pre">1</span></tt> means output range is
started from the 2nd record.</p>
<p><tt class="docutils literal"><span class="pre">limit</span></tt> specifies the max number of output records. <tt class="docutils literal"><span class="pre">--limit</span> <span class="pre">1</span></tt>
means the number of output records is 1 at a maximium. If no records
are matched, <tt class="docutils literal"><span class="pre">select</span></tt> command outputs no records.</p>
</div>
<div class="section" id="the-total-number-of-records">
<h3>8.3.22.3.4. The total number of records<a class="headerlink" href="#the-total-number-of-records" title="Permalink to this headline">¶</a></h3>
<p>You can use <tt class="docutils literal"><span class="pre">--limit</span> <span class="pre">0</span></tt> to retrieve the total number of recrods
without any contents of records.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --limit 0
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">--limit</span> <span class="pre">0</span></tt> is also useful for retrieving only the number of matched
records.</p>
</div>
</div>
<div class="section" id="parameters">
<h2>8.3.22.4. Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
<p>This section describes all parameters. Parameters are categorized.</p>
<div class="section" id="required-parameter">
<h3>8.3.22.4.1. Required parameter<a class="headerlink" href="#required-parameter" title="Permalink to this headline">¶</a></h3>
<p>There is a required parameter, <tt class="docutils literal"><span class="pre">table</span></tt>.</p>
<div class="section" id="table">
<h4>8.3.22.4.1.1. <tt class="docutils literal"><span class="pre">table</span></tt><a class="headerlink" href="#table" title="Permalink to this headline">¶</a></h4>
<p>It specifies a table to be searched. <tt class="docutils literal"><span class="pre">table</span></tt> must be specified.</p>
<p>If nonexistent table is specified, an error is returned.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Nonexistent
# [
#   [
#     -22,
#     1337566253.89858,
#     0.000355720520019531,
#     &quot;invalid table name: &lt;Nonexistent&gt;&quot;,
#     [
#       [
#         &quot;grn_select&quot;,
#         &quot;proc.c&quot;,
#         778
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
</div>
</div>
<div class="section" id="search-related-parameters">
<h3>8.3.22.4.2. Search related parameters<a class="headerlink" href="#search-related-parameters" title="Permalink to this headline">¶</a></h3>
<p>There are search related parameters. Typically, <tt class="docutils literal"><span class="pre">match_columns</span></tt> and
<tt class="docutils literal"><span class="pre">query</span></tt> parameters are used for implementing a search
box. <tt class="docutils literal"><span class="pre">filter</span></tt> parameters is used for implementing complex search
feature.</p>
<p>If both <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">filter</span></tt> are specified, selected records must
be matched against both <tt class="docutils literal"><span class="pre">query</span></tt> and <tt class="docutils literal"><span class="pre">filter</span></tt>. If both <tt class="docutils literal"><span class="pre">query</span></tt>
and <tt class="docutils literal"><span class="pre">filter</span></tt> aren't specified, all records are selected.</p>
<div class="section" id="match-columns">
<span id="select-match-columns"></span><h4>8.3.22.4.2.1. <tt class="docutils literal"><span class="pre">match_columns</span></tt><a class="headerlink" href="#match-columns" title="Permalink to this headline">¶</a></h4>
<p>It specifies the default target column for fulltext search by
<tt class="docutils literal"><span class="pre">query</span></tt> parameter value. A target column for fulltext search can be
specified in <tt class="docutils literal"><span class="pre">query</span></tt> parameter. The difference between
<tt class="docutils literal"><span class="pre">match_columns</span></tt> and <tt class="docutils literal"><span class="pre">query</span></tt> is whether weight is supported or
not. <tt class="docutils literal"><span class="pre">match_columns</span></tt> supports weight but <tt class="docutils literal"><span class="pre">query</span></tt> doesn't.</p>
<p>Weight is relative importance of target column. A higher weight target
column gets more hit score rather than a lower weight target column
when a record is matched by fulltext search. The default weight is 1.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">match_columns</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query fast --output_columns &#39;_key, _score&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         &quot;Groonga&quot;,
#         1
#       ],
#       [
#         &quot;Mroonga&quot;,
#         2
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">--match_columns</span> <span class="pre">content</span></tt> means the default target column for
fulltext search is <tt class="docutils literal"><span class="pre">content</span></tt> column and its weight
is 1. <tt class="docutils literal"><span class="pre">--output_columns</span> <span class="pre">'_key,</span> <span class="pre">_score'</span></tt> means that the <tt class="docutils literal"><span class="pre">select</span></tt>
command outputs <tt class="docutils literal"><span class="pre">_key</span></tt> value and <tt class="docutils literal"><span class="pre">_score</span></tt> value for matched
records.</p>
<p>Pay attention to <tt class="docutils literal"><span class="pre">_score</span></tt> value. <tt class="docutils literal"><span class="pre">_score</span></tt> value is the number of
matched counts against <tt class="docutils literal"><span class="pre">query</span></tt> parameter value. In the example,
<tt class="docutils literal"><span class="pre">query</span></tt> parameter value is <tt class="docutils literal"><span class="pre">fast</span></tt>. The fact that <tt class="docutils literal"><span class="pre">_score</span></tt> value
is 1 means that <tt class="docutils literal"><span class="pre">fast</span></tt> appers in <tt class="docutils literal"><span class="pre">content</span></tt> column only once.  The
fact that <tt class="docutils literal"><span class="pre">_score</span></tt> value is 2 means that <tt class="docutils literal"><span class="pre">fast</span></tt> appears in
<tt class="docutils literal"><span class="pre">content</span></tt> column twice.</p>
<p>To specify weight, <tt class="docutils literal"><span class="pre">column</span> <span class="pre">*</span> <span class="pre">weight</span></tt> syntax is used. Here is a
weight usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns &#39;content * 2&#39; --query fast --output_columns &#39;_key, _score&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         &quot;Groonga&quot;,
#         2
#       ],
#       [
#         &quot;Mroonga&quot;,
#         4
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">--match_columns</span> <span class="pre">'content</span> <span class="pre">*</span> <span class="pre">2'</span></tt> means the default target column for
fulltext search is <tt class="docutils literal"><span class="pre">content</span></tt> column and its weight is 2.</p>
<p>Pay attention to <tt class="docutils literal"><span class="pre">_score</span></tt> value. <tt class="docutils literal"><span class="pre">_score</span></tt> value is doubled because
weight is 2.</p>
<p>You can specify one or more columns as the default target columns for
fulltext search. If one or more columns are specified, fulltext search
is done for all columns and scores are accumulated. If one of the
columns is matched against <tt class="docutils literal"><span class="pre">query</span></tt> parameter value, the record is
treated as matched.</p>
<p>To specify one or more columns, <tt class="docutils literal"><span class="pre">column1</span> <span class="pre">*</span> <span class="pre">weight1</span> <span class="pre">||</span> <span class="pre">column2</span> <span class="pre">*</span>
<span class="pre">weight2</span> <span class="pre">||</span> <span class="pre">...</span></tt> syntax is used. <tt class="docutils literal"><span class="pre">*</span> <span class="pre">weight</span></tt> can be omitted. If it is
omitted, 1 is used for weight. Here is a one or more columns usage
example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns &#39;_key * 10 || content&#39; --query groonga --output_columns &#39;_key, _score&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         &quot;Groonga&quot;,
#         11
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">--match_columns</span> <span class="pre">'_key</span> <span class="pre">*</span> <span class="pre">10</span> <span class="pre">||</span> <span class="pre">content'</span></tt> means the default target
columns for fulltext search are <tt class="docutils literal"><span class="pre">_key</span></tt> and <tt class="docutils literal"><span class="pre">content</span></tt> columns and
<tt class="docutils literal"><span class="pre">_key</span></tt> column's weight is 10 and <tt class="docutils literal"><span class="pre">content</span></tt> column's weight
is 1. This weight allocation means <tt class="docutils literal"><span class="pre">_key</span></tt> column value is more
important rather than <tt class="docutils literal"><span class="pre">content</span></tt> column value. In this example, title
of blog entry is more important rather thatn content of blog entry.</p>
</div>
<div class="section" id="query">
<span id="select-query"></span><h4>8.3.22.4.2.2. <tt class="docutils literal"><span class="pre">query</span></tt><a class="headerlink" href="#query" title="Permalink to this headline">¶</a></h4>
<p>It specifies the query text. Normally, it is used for fulltext search
with <tt class="docutils literal"><span class="pre">match_columns</span></tt> parameter. <tt class="docutils literal"><span class="pre">query</span></tt> parameter is designed for
a fulltext search form in a Web page. A query text should be formatted
in <a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a>. The syntax is similar to common search
form like Google's search form. For example, <tt class="docutils literal"><span class="pre">word1</span> <span class="pre">word2</span></tt> means
that groonga searches records that contain both <tt class="docutils literal"><span class="pre">word1</span></tt> and
<tt class="docutils literal"><span class="pre">word2</span></tt>. <tt class="docutils literal"><span class="pre">word1</span> <span class="pre">OR</span> <span class="pre">word2</span></tt> means that groogna searches records that
contain either <tt class="docutils literal"><span class="pre">word1</span></tt> or <tt class="docutils literal"><span class="pre">word2</span></tt>.</p>
<p>Here is a simple logical and search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query &quot;fast groonga&quot;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain two words
<tt class="docutils literal"><span class="pre">fast</span></tt> and <tt class="docutils literal"><span class="pre">groonga</span></tt> in <tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt>
table.</p>
<p>Here is a simple logical or search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query &quot;groonga OR mroonga&quot;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain one of two words
<tt class="docutils literal"><span class="pre">groonga</span></tt> or <tt class="docutils literal"><span class="pre">mroonga</span></tt> in <tt class="docutils literal"><span class="pre">content</span></tt> column value from
<tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>See <a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a> for other syntax.</p>
<p>It can be used for not only fulltext search but also other
conditions. For example, <tt class="docutils literal"><span class="pre">column:value</span></tt> means the value of
<tt class="docutils literal"><span class="pre">column</span></tt> column is equal to <tt class="docutils literal"><span class="pre">value</span></tt>. <tt class="docutils literal"><span class="pre">column:&lt;value</span></tt> means the
value of <tt class="docutils literal"><span class="pre">column</span></tt> column is less than <tt class="docutils literal"><span class="pre">value</span></tt>.</p>
<p>Here is a simple equality operator search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --query _key:Groonga
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that <tt class="docutils literal"><span class="pre">_key</span></tt> column value is
<tt class="docutils literal"><span class="pre">Groonga</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>Here is a simple less than operator search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --query n_likes:&lt;11
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         4
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that <tt class="docutils literal"><span class="pre">n_likes</span></tt> column value
is less than <tt class="docutils literal"><span class="pre">11</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>See <a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a> for other operations.</p>
</div>
<div class="section" id="filter">
<h4>8.3.22.4.2.3. <tt class="docutils literal"><span class="pre">filter</span></tt><a class="headerlink" href="#filter" title="Permalink to this headline">¶</a></h4>
<p>It specifies the filter text. Normally, it is used for complex search
conditions. <tt class="docutils literal"><span class="pre">filter</span></tt> can be used with <tt class="docutils literal"><span class="pre">query</span></tt> parameter. If both
<tt class="docutils literal"><span class="pre">filter</span></tt> and <tt class="docutils literal"><span class="pre">query</span></tt> are specified, there are conbined with
logical and. It means that matched records should be matched against
both <tt class="docutils literal"><span class="pre">filter</span></tt> and <tt class="docutils literal"><span class="pre">query</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">filter</span></tt> parameter is designed for complex conditions. A filter text
should be formated in <a class="reference internal" href="../grn_expr/script_syntax.html"><em>Script syntax</em></a>. The syntax is
similar to ECMAScript. For example, <tt class="docutils literal"><span class="pre">column</span> <span class="pre">==</span> <span class="pre">&quot;value&quot;</span></tt> means that
the value of <tt class="docutils literal"><span class="pre">column</span></tt> column is equal to <tt class="docutils literal"><span class="pre">&quot;value&quot;</span></tt>. <tt class="docutils literal"><span class="pre">column</span> <span class="pre">&lt;</span>
<span class="pre">value</span></tt> means that the value of <tt class="docutils literal"><span class="pre">column</span></tt> column is less than
<tt class="docutils literal"><span class="pre">value</span></tt>.</p>
<p>Here is a simple equality operator search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter &#39;_key == &quot;Groonga&quot;&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that <tt class="docutils literal"><span class="pre">_key</span></tt> column value is
<tt class="docutils literal"><span class="pre">Groonga</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>Here is a simple less than operator search example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter &#39;n_likes &lt; 11&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         4
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that <tt class="docutils literal"><span class="pre">n_likes</span></tt> column value
is less than <tt class="docutils literal"><span class="pre">11</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>See <a class="reference internal" href="../grn_expr/script_syntax.html"><em>Script syntax</em></a> for other operators.</p>
</div>
</div>
<div class="section" id="advanced-search-parameters">
<h3>8.3.22.4.3. Advanced search parameters<a class="headerlink" href="#advanced-search-parameters" title="Permalink to this headline">¶</a></h3>
<div class="section" id="match-escalation-threshold">
<span id="id1"></span><h4>8.3.22.4.3.1. <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt><a class="headerlink" href="#match-escalation-threshold" title="Permalink to this headline">¶</a></h4>
<p>It specifies threshold to determine whether search storategy
escalation is used or not. The threshold is compared against the
number of matched records. If the number of matched records is equal
to or less than the threshold, the search storategy escalation is
used. See <a class="reference internal" href="../../spec/search.html"><em>検索</em></a> about the search storategy escalation.</p>
<p>The default threshold is 0. It means that search storategy escalation
is used only when no records are matched.</p>
<p>The default threshold can be customized by one of the followings.</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">--with-match-escalation-threshold</span></tt> option of configure</li>
<li><tt class="docutils literal"><span class="pre">--match-escalation-threshold</span></tt> option of groogna command</li>
<li><tt class="docutils literal"><span class="pre">match-escalation-threshold</span></tt> configuration item in configuration
file</li>
</ul>
</div></blockquote>
<p>Here is a simple <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt> usage example. The
first <tt class="docutils literal"><span class="pre">select</span></tt> doesn't have <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt>
parameter. The second <tt class="docutils literal"><span class="pre">select</span></tt> has <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt>
parameter.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query groo
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ]
#     ]
#   ]
# ]
select Entries --match_columns content --query groo --match_escalation_threshold -1
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         0
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The first <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain a word
<tt class="docutils literal"><span class="pre">groo</span></tt> in <tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt> table. But no
records are matched because the <tt class="docutils literal"><span class="pre">TokenBigram</span></tt> tokenizer tokenizes
<tt class="docutils literal"><span class="pre">groonga</span></tt> to <tt class="docutils literal"><span class="pre">groonga</span></tt> not <tt class="docutils literal"><span class="pre">gr|ro|oo|on|ng|ga</span></tt>. (The
<tt class="docutils literal"><span class="pre">TokenBigramSplitSymbolAlpha</span></tt> tokenizer tokenizes <tt class="docutils literal"><span class="pre">groonga</span></tt> to
<tt class="docutils literal"><span class="pre">gr|ro|oo|on|ng|ga</span></tt>. See <a class="reference internal" href="../tokenizers.html"><em>Tokenizers</em></a> for details.)
It means that <tt class="docutils literal"><span class="pre">groonga</span></tt> is indexed but <tt class="docutils literal"><span class="pre">groo</span></tt> isn't indexed. So no
records are matched against <tt class="docutils literal"><span class="pre">groo</span></tt> by exact match. In the case, the
search storategy escalation is used because the number of matched
records (0) is equal to <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt> (0). One record
is matched against <tt class="docutils literal"><span class="pre">groo</span></tt> by unsplit search.</p>
<p>The second <tt class="docutils literal"><span class="pre">select</span></tt> command also searches records that contain a
word <tt class="docutils literal"><span class="pre">groo</span></tt> in <tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt> table. And
it also doesn't found matched records. In this case, the search
storategy escalation is not used because the number of matched
records (0) is larger than <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt> (-1). So no
more searches aren't executed. And no records are matched.</p>
</div>
<div class="section" id="query-expansion">
<span id="id2"></span><h4>8.3.22.4.3.2. <tt class="docutils literal"><span class="pre">query_expansion</span></tt><a class="headerlink" href="#query-expansion" title="Permalink to this headline">¶</a></h4>
<p>Deprecated. Use <a class="reference internal" href="#query-expander"><em>query_expander</em></a> instead.</p>
</div>
<div class="section" id="query-flags">
<span id="id3"></span><h4>8.3.22.4.3.3. <tt class="docutils literal"><span class="pre">query_flags</span></tt><a class="headerlink" href="#query-flags" title="Permalink to this headline">¶</a></h4>
<p>It customs <tt class="docutils literal"><span class="pre">query</span></tt> parameter syntax. You cannot update column value
by <tt class="docutils literal"><span class="pre">query</span></tt> parameter by default. But if you specify
<tt class="docutils literal"><span class="pre">ALLOW_COLUMN|ALLOW_UPDATE</span></tt> as <tt class="docutils literal"><span class="pre">query_flags</span></tt>, you can update
column value by <tt class="docutils literal"><span class="pre">query</span></tt>.</p>
<p>Here are available values:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">ALLOW_PRAGMA</span></tt></li>
<li><tt class="docutils literal"><span class="pre">ALLOW_COLUMN</span></tt></li>
<li><tt class="docutils literal"><span class="pre">ALLOW_UPDATE</span></tt></li>
<li><tt class="docutils literal"><span class="pre">ALLOW_LEADING_NOT</span></tt></li>
<li><tt class="docutils literal"><span class="pre">NONE</span></tt></li>
</ul>
<p><tt class="docutils literal"><span class="pre">ALLOW_PRAGMA</span></tt> enables pragma at the head of <tt class="docutils literal"><span class="pre">query</span></tt>. This is not
implemented yet.</p>
<p><tt class="docutils literal"><span class="pre">ALLOW_COLUMN</span></tt> enables search againt columns that are not included
in <tt class="docutils literal"><span class="pre">match_columns</span></tt>. To specify column, there are <tt class="docutils literal"><span class="pre">COLUMN:...</span></tt>
syntaxes.</p>
<p><tt class="docutils literal"><span class="pre">ALLOW_UPDATE</span></tt> enables column update by <tt class="docutils literal"><span class="pre">query</span></tt> with
<tt class="docutils literal"><span class="pre">COLUMN:=NEW_VALUE</span></tt> syntax. <tt class="docutils literal"><span class="pre">ALLOW_COLUMN</span></tt> is also required to
update column because the column update syntax specifies column.</p>
<p><tt class="docutils literal"><span class="pre">ALLOW_LEADING_NOT</span></tt> enables leading NOT condition with <tt class="docutils literal"><span class="pre">-WORD</span></tt>
syntax. The query searches records that doesn't match
<tt class="docutils literal"><span class="pre">WORD</span></tt>. Leading NOT condition query is heavy query in many cases
because it matches many records. So this flag is disabled by
default. Be careful about it when you use the flag.</p>
<p><tt class="docutils literal"><span class="pre">NONE</span></tt> is just ignores. You can use <tt class="docutils literal"><span class="pre">NONE</span></tt> for specifying no flags.</p>
<p>They can be combined by separated <tt class="docutils literal"><span class="pre">|</span></tt> such as
<tt class="docutils literal"><span class="pre">ALLOW_COLUMN|ALLOW_UPDATE</span></tt>.</p>
<p>The default value is <tt class="docutils literal"><span class="pre">ALLOW_PRAGMA|ALLOW_COLUMN</span></tt>.</p>
<p>Here is a usage example of <tt class="docutils literal"><span class="pre">ALLOW_COLUMN</span></tt>.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --query content:@mroonga --query_flags ALLOW_COLUMN
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain <tt class="docutils literal"><span class="pre">mroonga</span></tt> in
<tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>Here is a usage example of <tt class="docutils literal"><span class="pre">ALLOW_UPDATE</span></tt>.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Users TABLE_HASH_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Users age COLUMN_SCALAR UInt32
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Users
[
{&quot;_key&quot;: &quot;alice&quot;, &quot;age&quot;: 18},
{&quot;_key&quot;: &quot;bob&quot;,   &quot;age&quot;: 20}
]
# [[0, 1337566253.89858, 0.000355720520019531], 2]
select Users --query age:=19 --query_flags ALLOW_COLUMN|ALLOW_UPDATE
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;age&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;alice&quot;,
#         19
#       ],
#       [
#         2,
#         &quot;bob&quot;,
#         19
#       ]
#     ]
#   ]
# ]
select Users
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;age&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;alice&quot;,
#         19
#       ],
#       [
#         2,
#         &quot;bob&quot;,
#         19
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The first <tt class="docutils literal"><span class="pre">select</span></tt> command sets <tt class="docutils literal"><span class="pre">age</span></tt> column value of all records
to <tt class="docutils literal"><span class="pre">19</span></tt>. The second <tt class="docutils literal"><span class="pre">select</span></tt> command outputs updated <tt class="docutils literal"><span class="pre">age</span></tt>
column values.</p>
<p>Here is a usage example of <tt class="docutils literal"><span class="pre">ALLOW_LEADING_NOT</span></tt>.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query -mroonga --query_flags ALLOW_LEADING_NOT
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         4
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that don't contain <tt class="docutils literal"><span class="pre">mroonga</span></tt>
in <tt class="docutils literal"><span class="pre">content</span></tt> column value from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
<p>Here is a usage example of <tt class="docutils literal"><span class="pre">NONE</span></tt>.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query &#39;mroonga OR _key:Groonga&#39; --query_flags NONE
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command searches records that contain one of two words
<tt class="docutils literal"><span class="pre">mroonga</span></tt> or <tt class="docutils literal"><span class="pre">_key:Groonga</span></tt> in <tt class="docutils literal"><span class="pre">content</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.
Note that <tt class="docutils literal"><span class="pre">_key:Groonga</span></tt> doesn't mean that the value of <tt class="docutils literal"><span class="pre">_key</span></tt>
column is equal to <tt class="docutils literal"><span class="pre">Groonga</span></tt>. Because <tt class="docutils literal"><span class="pre">ALLOW_COLUMN</span></tt> flag is not
specified.</p>
<p>See also <a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a>.</p>
</div>
<div class="section" id="query-expander">
<span id="id4"></span><h4>8.3.22.4.3.4. <tt class="docutils literal"><span class="pre">query_expander</span></tt><a class="headerlink" href="#query-expander" title="Permalink to this headline">¶</a></h4>
<p>It's for query expansion. Query expansion substitutes specific words
to another words in query. Nomally, it's used for synonym search.</p>
<p>It specifies a column that is used to substitute <tt class="docutils literal"><span class="pre">query</span></tt> parameter
value. The format of this parameter value is
&quot;<tt class="docutils literal"><span class="pre">${TABLE}.${COLUMN}</span></tt>&quot;. For example, &quot;<tt class="docutils literal"><span class="pre">Terms.synonym</span></tt>&quot; specifies
<tt class="docutils literal"><span class="pre">synonym</span></tt> column in <tt class="docutils literal"><span class="pre">Terms</span></tt> table.</p>
<p>Table for query expansion is called &quot;substitution table&quot;. Substitution
table's key must be <tt class="docutils literal"><span class="pre">ShortText</span></tt>. So array table (<tt class="docutils literal"><span class="pre">TABLE_NO_KEY</span></tt>)
can't be used for query expansion. Because array table doesn't have
key.</p>
<p>Column for query expansion is called &quot;substitution
column&quot;. Substitution column's value type must be
<tt class="docutils literal"><span class="pre">ShortText</span></tt>. Column type must be vector (<tt class="docutils literal"><span class="pre">COLUMN_VECTOR</span></tt>).</p>
<p>Query expansion substitutes key of substitution table in query with
values in substitution column. If a word in <tt class="docutils literal"><span class="pre">query</span></tt> is a key of
substitution table, the word is substituted with substitution column
value that is associated with the key. Substition isn't performed
recursively. It means that substitution target words in substituted
query aren't substituted.</p>
<p>Here is a sample substitution table to show a simple
<tt class="docutils literal"><span class="pre">query_expander</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create Thesaurus TABLE_PAT_KEY|KEY_NORMALIZE ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Thesaurus synonym COLUMN_VECTOR ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Thesaurus
[
{&quot;_key&quot;: &quot;mroonga&quot;, &quot;synonym&quot;: [&quot;mroonga&quot;, &quot;tritonn&quot;, &quot;groonga mysql&quot;]},
{&quot;_key&quot;: &quot;groonga&quot;, &quot;synonym&quot;: [&quot;groonga&quot;, &quot;senna&quot;]}
]
# [[0, 1337566253.89858, 0.000355720520019531], 2]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">Thesaurus</span></tt> substitution table has two synonyms, <tt class="docutils literal"><span class="pre">&quot;mroonga&quot;</span></tt> and
<tt class="docutils literal"><span class="pre">&quot;groonga&quot;</span></tt>. If an user searches with <tt class="docutils literal"><span class="pre">&quot;mroonga&quot;</span></tt>, groonga
searches with <tt class="docutils literal"><span class="pre">&quot;((mroonga)</span> <span class="pre">OR</span> <span class="pre">(tritonn)</span> <span class="pre">OR</span> <span class="pre">(groonga</span> <span class="pre">mysql))&quot;</span></tt>. If an
user searches with <tt class="docutils literal"><span class="pre">&quot;groonga&quot;</span></tt>, groonga searchs with <tt class="docutils literal"><span class="pre">&quot;((groonga)</span>
<span class="pre">OR</span> <span class="pre">(senna))&quot;</span></tt>. Nomrally, it's good idea that substitution table has
<tt class="docutils literal"><span class="pre">KEY_NORMALIZE</span></tt> flag. If the flag is used, substitute target word is
matched in case insensitive manner.</p>
<p>Note that those synonym values include the key value such as
<tt class="docutils literal"><span class="pre">&quot;mroonga&quot;</span></tt> and <tt class="docutils literal"><span class="pre">&quot;groonga&quot;</span></tt>. It's recommended that you include the
key value. If you don't include key value, substituted value doesn't
include the original substitute target value. Normally, including the
original value is better search result. If you have a word that you
don't want to be searched, you should not include the original
word. For example, you can implement &quot;stop words&quot; by an empty vector
value.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">query_expander</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query &quot;mroonga&quot;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         1
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
select Entries --match_columns content --query &quot;mroonga&quot; --query_expander Thesaurus.synonym
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
select Entries --match_columns content --query &quot;((mroonga) OR (tritonn) OR (groonga mysql))&quot;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The first <tt class="docutils literal"><span class="pre">select</span></tt> command doesn't use query expansion. So a record
that has <tt class="docutils literal"><span class="pre">&quot;tritonn&quot;</span></tt> isn't found. The second <tt class="docutils literal"><span class="pre">select</span></tt> command uses
query expansion. So a record that has <tt class="docutils literal"><span class="pre">&quot;tritonn&quot;</span></tt> is found. The
third <tt class="docutils literal"><span class="pre">select</span></tt> command doesn't use query expansion but it is same as
the second <tt class="docutils literal"><span class="pre">select</span></tt> command. The third one uses expanded query.</p>
<p>Each substitute value can contain any <a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a> syntax
such as <tt class="docutils literal"><span class="pre">(...)</span></tt> and <tt class="docutils literal"><span class="pre">OR</span></tt>. You can use complex substitution by
using those syntax.</p>
<p>Here is a complex substitution usage example that uses query syntax.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>load --table Thesaurus
[
{&quot;_key&quot;: &quot;popular&quot;, &quot;synonym&quot;: [&quot;popular&quot;, &quot;n_likes:&gt;=10&quot;]}
]
# [[0, 1337566253.89858, 0.000355720520019531], 1]
select Entries --match_columns content --query &quot;popular&quot; --query_expander Thesaurus.synonym
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">load</span></tt> command registers a new synonym <tt class="docutils literal"><span class="pre">&quot;popular&quot;</span></tt>. It is
substituted with <tt class="docutils literal"><span class="pre">((popular)</span> <span class="pre">OR</span> <span class="pre">(n_likes:&gt;=10))</span></tt>. The substituted
query means that &quot;popular&quot; is containing the word &quot;popular&quot; or 10 or
more liked entries.</p>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs records that <tt class="docutils literal"><span class="pre">n_likes</span></tt> column value
is equal to or more than <tt class="docutils literal"><span class="pre">10</span></tt> from <tt class="docutils literal"><span class="pre">Entries</span></tt> table.</p>
</div>
</div>
<div class="section" id="output-related-parameters">
<h3>8.3.22.4.4. Output related parameters<a class="headerlink" href="#output-related-parameters" title="Permalink to this headline">¶</a></h3>
<div class="section" id="output-columns">
<h4>8.3.22.4.4.1. <tt class="docutils literal"><span class="pre">output_columns</span></tt><a class="headerlink" href="#output-columns" title="Permalink to this headline">¶</a></h4>
<p>It specifies output columns separated by <tt class="docutils literal"><span class="pre">,</span></tt>.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">output_columns</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns &#39;_id, _key&#39; --limit 1
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command just outputs <tt class="docutils literal"><span class="pre">_id</span></tt> and <tt class="docutils literal"><span class="pre">_key</span></tt> column
values.</p>
<p><tt class="docutils literal"><span class="pre">*</span></tt> is a special value. It means that all columns that are not
<a class="reference internal" href="../pseudo_column.html"><em>疑似カラム (pseudo_column)</em></a>.</p>
<p>Here is a <tt class="docutils literal"><span class="pre">*</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns &#39;_key, *&#39; --limit 1
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs <tt class="docutils literal"><span class="pre">_key</span></tt> pseudo column, <tt class="docutils literal"><span class="pre">content</span></tt>
column and <tt class="docutils literal"><span class="pre">n_likes</span></tt> column values but doesn't output <tt class="docutils literal"><span class="pre">_id</span></tt> pseudo
column value.</p>
<p>The default value is <tt class="docutils literal"><span class="pre">_id,</span> <span class="pre">_key,</span> <span class="pre">*</span></tt>. It means that all column
values except <tt class="docutils literal"><span class="pre">_score</span></tt> are outputted.</p>
</div>
<div class="section" id="sortby">
<h4>8.3.22.4.4.2. <tt class="docutils literal"><span class="pre">sortby</span></tt><a class="headerlink" href="#sortby" title="Permalink to this headline">¶</a></h4>
<p>It specifies sort keys separated by <tt class="docutils literal"><span class="pre">,</span></tt>. Each sort key is column
name.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">sortby</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --sortby &#39;n_likes, _id&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command sorts by <tt class="docutils literal"><span class="pre">n_likes</span></tt> column value in ascending
order. For records that has the same <tt class="docutils literal"><span class="pre">n_likes</span></tt> are sorted by <tt class="docutils literal"><span class="pre">_id</span></tt>
in ascending order. <tt class="docutils literal"><span class="pre">&quot;Good-bye</span> <span class="pre">Senna&quot;</span></tt> and <tt class="docutils literal"><span class="pre">&quot;Good-bye</span> <span class="pre">Tritonn&quot;</span></tt>
are the case.</p>
<p>If you want to sort in descending order, add <tt class="docutils literal"><span class="pre">-</span></tt> before column name.</p>
<p>Here is a descending order <tt class="docutils literal"><span class="pre">sortby</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --sortby &#39;-n_likes, _id&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command sorts by <tt class="docutils literal"><span class="pre">n_likes</span></tt> column value in descending
order. But ascending order is used for sorting by <tt class="docutils literal"><span class="pre">_id</span></tt>.</p>
<p>You can use <tt class="docutils literal"><span class="pre">_score</span></tt> pseudo column in <tt class="docutils literal"><span class="pre">sortby</span></tt> if you use
<tt class="docutils literal"><span class="pre">query</span></tt> or <tt class="docutils literal"><span class="pre">filter</span></tt> parameter.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --match_columns content --query fast --sortby -_score --output_columns &#39;_key, _score&#39;
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;_score&quot;,
#           &quot;Int32&quot;
#         ]
#       ],
#       [
#         &quot;Mroonga&quot;,
#         2
#       ],
#       [
#         &quot;Groonga&quot;,
#         1
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command sorts matched records by hit score in
descending order and outputs record key and hit score.</p>
<p>If you use <tt class="docutils literal"><span class="pre">_score</span></tt> without <tt class="docutils literal"><span class="pre">query</span></tt> nor <tt class="docutils literal"><span class="pre">filter</span></tt> parameters,
it's just ignored but get a warning in log file.</p>
</div>
<div class="section" id="offset">
<h4>8.3.22.4.4.3. <tt class="docutils literal"><span class="pre">offset</span></tt><a class="headerlink" href="#offset" title="Permalink to this headline">¶</a></h4>
<p>It specifies offset to determine output records range. Offset is
zero-origin. <tt class="docutils literal"><span class="pre">--offset</span> <span class="pre">1</span></tt> means output range is started from the 2nd
record.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --sortby _id --offset 3 --output_columns _key
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ],
#       [
#         &quot;Good-bye Senna&quot;
#       ],
#       [
#         &quot;Good-bye Tritonn&quot;
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs from the 4th record.</p>
<p>You can specify negative value. It means that <tt class="docutils literal"><span class="pre">the</span> <span class="pre">number</span> <span class="pre">of</span> <span class="pre">matched</span>
<span class="pre">records</span> <span class="pre">+</span> <span class="pre">offset</span></tt>. If you have 3 matched records and specify
<tt class="docutils literal"><span class="pre">--offset</span> <span class="pre">-2</span></tt>, you get records from the 1st (<tt class="docutils literal"><span class="pre">3</span> <span class="pre">+</span> <span class="pre">-2</span> <span class="pre">=</span> <span class="pre">1</span></tt>) record
to the 3rd record.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --sortby _id --offset -2 --output_columns _key
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ],
#       [
#         &quot;Good-bye Senna&quot;
#       ],
#       [
#         &quot;Good-bye Tritonn&quot;
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs from the 4th record because the total
number of records is <tt class="docutils literal"><span class="pre">5</span></tt>.</p>
<p>The default value is <tt class="docutils literal"><span class="pre">0</span></tt>.</p>
</div>
<div class="section" id="limit">
<h4>8.3.22.4.4.4. <tt class="docutils literal"><span class="pre">limit</span></tt><a class="headerlink" href="#limit" title="Permalink to this headline">¶</a></h4>
<p>It specifies the max number of output records. If the number of
matched records is less than <tt class="docutils literal"><span class="pre">limit</span></tt>, all records are outputted.</p>
<p>Here is a simple <tt class="docutils literal"><span class="pre">limit</span></tt> usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --sortby _id --offset 2 --limit 3 --output_columns _key
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ]
#       ],
#       [
#         &quot;Mroonga&quot;
#       ],
#       [
#         &quot;Good-bye Senna&quot;
#       ],
#       [
#         &quot;Good-bye Tritonn&quot;
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs the 3rd, the 4th and the 5th records.</p>
<p>You can specify negative value. It means that <tt class="docutils literal"><span class="pre">the</span> <span class="pre">number</span> <span class="pre">of</span> <span class="pre">matched</span>
<span class="pre">records</span> <span class="pre">+</span> <span class="pre">limit</span> <span class="pre">+</span> <span class="pre">1</span></tt>. For example, <tt class="docutils literal"><span class="pre">--limit</span> <span class="pre">-1</span></tt> outputs all
records. It's very useful value to show all records.</p>
<p>Here is a simple negative <tt class="docutils literal"><span class="pre">limit</span></tt> value usage example.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select Entries --limit -1
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         5
#       ],
#       [
#         [
#           &quot;_id&quot;,
#           &quot;UInt32&quot;
#         ],
#         [
#           &quot;_key&quot;,
#           &quot;ShortText&quot;
#         ],
#         [
#           &quot;content&quot;,
#           &quot;Text&quot;
#         ],
#         [
#           &quot;n_likes&quot;,
#           &quot;UInt32&quot;
#         ]
#       ],
#       [
#         1,
#         &quot;The first post!&quot;,
#         &quot;Welcome! This is my first post!&quot;,
#         5
#       ],
#       [
#         2,
#         &quot;Groonga&quot;,
#         &quot;I started to use groonga. It&#39;s very fast!&quot;,
#         10
#       ],
#       [
#         3,
#         &quot;Mroonga&quot;,
#         &quot;I also started to use mroonga. It&#39;s also very fast! Really fast!&quot;,
#         15
#       ],
#       [
#         4,
#         &quot;Good-bye Senna&quot;,
#         &quot;I migrated all Senna system!&quot;,
#         3
#       ],
#       [
#         5,
#         &quot;Good-bye Tritonn&quot;,
#         &quot;I also migrated all Tritonn system!&quot;,
#         3
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">select</span></tt> command outputs all records.</p>
<p>The default value is <tt class="docutils literal"><span class="pre">10</span></tt>.</p>
</div>
<div class="section" id="scorer">
<h4>8.3.22.4.4.5. <tt class="docutils literal"><span class="pre">scorer</span></tt><a class="headerlink" href="#scorer" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>検索条件にマッチする全てのレコードに対して適用するgrn_exprをscript形式で指定します。</p>
<p>scorerは、検索処理が完了し、ソート処理が実行される前に呼び出されます。従って、各レコードのスコアを操作する式を指定しておけば、検索結果のソート順序をカスタマイズできるようになります。</p>
</div>
</div>
<div class="section" id="facet-related-parameters">
<h3>8.3.22.4.5. Facet related parameters<a class="headerlink" href="#facet-related-parameters" title="Permalink to this headline">¶</a></h3>
<div class="section" id="drilldown">
<h4>8.3.22.4.5.1. <tt class="docutils literal"><span class="pre">drilldown</span></tt><a class="headerlink" href="#drilldown" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>グループ化のキーとなるカラム名のリストをカンマ(',')区切りで指定します。検索条件にマッチした各レコードを出力したのちに、drilldownに指定されたカラムの値が同一であるレコードをとりまとめて、それぞれについて結果レコードを出力します。</p>
</div>
<div class="section" id="drilldown-sortby">
<h4>8.3.22.4.5.2. <tt class="docutils literal"><span class="pre">drilldown_sortby</span></tt><a class="headerlink" href="#drilldown-sortby" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>drilldown条件に指定されたカラムの値毎にとりまとめられたレコードについて、ソートキーとなるカラム名のリストをカンマ(',')区切りで指定します。sortbyパラメータと同様に昇降順を指定できます。</p>
</div>
<div class="section" id="drilldown-output-columns">
<h4>8.3.22.4.5.3. <tt class="docutils literal"><span class="pre">drilldown_output_columns</span></tt><a class="headerlink" href="#drilldown-output-columns" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>drilldown条件に指定されたカラムの値毎にとりまとめられたレコードについて、出力するカラム名のリストをカンマ(',')区切りで指定します。</p>
</div>
<div class="section" id="drilldown-offset">
<h4>8.3.22.4.5.4. <tt class="docutils literal"><span class="pre">drilldown_offset</span></tt><a class="headerlink" href="#drilldown-offset" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>drilldown条件に指定されたカラムの値毎にとりまとめられたレコードについて、出力対象となる最初のレコードの番号を0ベースで指定します。デフォルト値は0です。drilldown_offsetに負の値を指定した場合は、ヒットした件数 + drilldown_offsetによって算出される値が指定されたものとみなされます。</p>
</div>
<div class="section" id="drilldown-limit">
<h4>8.3.22.4.5.5. <tt class="docutils literal"><span class="pre">drilldown_limit</span></tt><a class="headerlink" href="#drilldown-limit" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>drilldown条件に指定されたカラムの値毎にとりまとめられたレコードについて、出力を行うレコードの件数を指定します。デフォルト値は10です。実際には、drilldown_offset + drilldown_limit がヒットした件数を超えない範囲でレコードが出力されます。drilldown_limitに負の値を指定した場合は、ヒットした件数 + drilldown_limit + 1 によって算出される値が指定されたものとみなされます。</p>
</div>
</div>
<div class="section" id="cache-related-parameter">
<h3>8.3.22.4.6. Cache related parameter<a class="headerlink" href="#cache-related-parameter" title="Permalink to this headline">¶</a></h3>
<div class="section" id="cache">
<h4>8.3.22.4.6.1. <tt class="docutils literal"><span class="pre">cache</span></tt><a class="headerlink" href="#cache" title="Permalink to this headline">¶</a></h4>
<p>TODO: write in English and add example.</p>
<p>クエリキャッシュに関する動作を設定します。</p>
<p><tt class="docutils literal"><span class="pre">no</span></tt></p>
<blockquote>
<div>検索結果をクエリキャッシュに残しません。キャッシュして再利用される可能性が低いクエリに対して用います。キャッシュ容量は有限です。有効なキャッシュが多くヒットするために、このパラメータは有効です。</div></blockquote>
</div>
</div>
</div>
<div class="section" id="id5">
<h2>8.3.22.5. 返値<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
<p>TODO: write in English and add example.</p>
<p>以下のようなjson形式で値が返却されます。</p>
<div class="highlight-none"><div class="highlight"><pre>[[リターンコード, 処理開始時間, 処理時間], [検索結果, ドリルダウン結果]]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">リターンコード</span></tt></p>
<blockquote>
<div>grn_rcに対応する数値が返されます。0(GRN_SUCCESS)以外の場合は、続いてエラー内容を示す
文字列が返されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">処理開始時間</span></tt></p>
<blockquote>
<div>処理を開始した時間について、1970年1月1日0時0分0秒を起点とした秒数を小数で返します。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">処理時間</span></tt></p>
<blockquote>
<div>処理にかかった秒数を返します。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">検索結果</span></tt></p>
<blockquote>
<div><p>drilldown条件が実行される前の検索結果が以下のように出力されます。:</p>
<div class="highlight-none"><div class="highlight"><pre>[[検索件数], [[カラム名1,カラム型1],..], 検索結果1,..]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">検索件数</span></tt></p>
<blockquote>
<div>検索件数が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">カラム名n</span></tt></p>
<blockquote>
<div>output_columnsに指定された条件に従って、対象となるカラム名が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">カラム型n</span></tt></p>
<blockquote>
<div>output_columnsに指定された条件に従って、対象となるカラム型が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">検索結果n</span></tt></p>
<blockquote>
<div>output_columns, offset, limitによって指定された条件に従って各レコードの値が出力されます。</div></blockquote>
</div></blockquote>
<p><tt class="docutils literal"><span class="pre">drilldown結果</span></tt></p>
<blockquote>
<div><p>drilldown処理の結果が以下のように出力されます。:</p>
<div class="highlight-none"><div class="highlight"><pre>[[[件数], [[カラム名1,カラム型1],..], 検索結果1,..],..]
</pre></div>
</div>
<p><tt class="docutils literal"><span class="pre">件数</span></tt></p>
<blockquote>
<div>drilldownに指定されたカラムの値の異なり数が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">カラム名n</span></tt></p>
<blockquote>
<div>drilldown_output_columnsに指定された条件に従って、対象となるカラム名が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">カラム型n</span></tt></p>
<blockquote>
<div>drilldown_output_columnsに指定された条件に従って、対象となるカラム型が出力されます。</div></blockquote>
<p><tt class="docutils literal"><span class="pre">ドリルダウン結果n</span></tt></p>
<blockquote>
<div>drilldown_output_columns, drilldown_offset, drilldown_limitによって指定された条件に従って各レコードの値が出力されます。</div></blockquote>
</div></blockquote>
</div>
<div class="section" id="see-also">
<h2>8.3.22.6. See also<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><ul class="simple">
<li><a class="reference internal" href="../grn_expr/query_syntax.html"><em>Query syntax</em></a></li>
<li><a class="reference internal" href="../grn_expr/script_syntax.html"><em>Script syntax</em></a></li>
</ul>
</div></blockquote>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">8.3.22. <tt class="docutils literal"><span class="pre">select</span></tt></a><ul>
<li><a class="reference internal" href="#summary">8.3.22.1. Summary</a></li>
<li><a class="reference internal" href="#syntax">8.3.22.2. Syntax</a></li>
<li><a class="reference internal" href="#usage">8.3.22.3. Usage</a><ul>
<li><a class="reference internal" href="#simple-usage">8.3.22.3.1. Simple usage</a></li>
<li><a class="reference internal" href="#search-conditions">8.3.22.3.2. Search conditions</a><ul>
<li><a class="reference internal" href="#search-condition-query">8.3.22.3.2.1. Search condition: <tt class="docutils literal"><span class="pre">query</span></tt></a></li>
<li><a class="reference internal" href="#search-condition-filter">8.3.22.3.2.2. Search condition: <tt class="docutils literal"><span class="pre">filter</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#paging">8.3.22.3.3. Paging</a></li>
<li><a class="reference internal" href="#the-total-number-of-records">8.3.22.3.4. The total number of records</a></li>
</ul>
</li>
<li><a class="reference internal" href="#parameters">8.3.22.4. Parameters</a><ul>
<li><a class="reference internal" href="#required-parameter">8.3.22.4.1. Required parameter</a><ul>
<li><a class="reference internal" href="#table">8.3.22.4.1.1. <tt class="docutils literal"><span class="pre">table</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#search-related-parameters">8.3.22.4.2. Search related parameters</a><ul>
<li><a class="reference internal" href="#match-columns">8.3.22.4.2.1. <tt class="docutils literal"><span class="pre">match_columns</span></tt></a></li>
<li><a class="reference internal" href="#query">8.3.22.4.2.2. <tt class="docutils literal"><span class="pre">query</span></tt></a></li>
<li><a class="reference internal" href="#filter">8.3.22.4.2.3. <tt class="docutils literal"><span class="pre">filter</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#advanced-search-parameters">8.3.22.4.3. Advanced search parameters</a><ul>
<li><a class="reference internal" href="#match-escalation-threshold">8.3.22.4.3.1. <tt class="docutils literal"><span class="pre">match_escalation_threshold</span></tt></a></li>
<li><a class="reference internal" href="#query-expansion">8.3.22.4.3.2. <tt class="docutils literal"><span class="pre">query_expansion</span></tt></a></li>
<li><a class="reference internal" href="#query-flags">8.3.22.4.3.3. <tt class="docutils literal"><span class="pre">query_flags</span></tt></a></li>
<li><a class="reference internal" href="#query-expander">8.3.22.4.3.4. <tt class="docutils literal"><span class="pre">query_expander</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#output-related-parameters">8.3.22.4.4. Output related parameters</a><ul>
<li><a class="reference internal" href="#output-columns">8.3.22.4.4.1. <tt class="docutils literal"><span class="pre">output_columns</span></tt></a></li>
<li><a class="reference internal" href="#sortby">8.3.22.4.4.2. <tt class="docutils literal"><span class="pre">sortby</span></tt></a></li>
<li><a class="reference internal" href="#offset">8.3.22.4.4.3. <tt class="docutils literal"><span class="pre">offset</span></tt></a></li>
<li><a class="reference internal" href="#limit">8.3.22.4.4.4. <tt class="docutils literal"><span class="pre">limit</span></tt></a></li>
<li><a class="reference internal" href="#scorer">8.3.22.4.4.5. <tt class="docutils literal"><span class="pre">scorer</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#facet-related-parameters">8.3.22.4.5. Facet related parameters</a><ul>
<li><a class="reference internal" href="#drilldown">8.3.22.4.5.1. <tt class="docutils literal"><span class="pre">drilldown</span></tt></a></li>
<li><a class="reference internal" href="#drilldown-sortby">8.3.22.4.5.2. <tt class="docutils literal"><span class="pre">drilldown_sortby</span></tt></a></li>
<li><a class="reference internal" href="#drilldown-output-columns">8.3.22.4.5.3. <tt class="docutils literal"><span class="pre">drilldown_output_columns</span></tt></a></li>
<li><a class="reference internal" href="#drilldown-offset">8.3.22.4.5.4. <tt class="docutils literal"><span class="pre">drilldown_offset</span></tt></a></li>
<li><a class="reference internal" href="#drilldown-limit">8.3.22.4.5.5. <tt class="docutils literal"><span class="pre">drilldown_limit</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#cache-related-parameter">8.3.22.4.6. Cache related parameter</a><ul>
<li><a class="reference internal" href="#cache">8.3.22.4.6.1. <tt class="docutils literal"><span class="pre">cache</span></tt></a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#id5">8.3.22.5. 返値</a></li>
<li><a class="reference internal" href="#see-also">8.3.22.6. See also</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="register.html"
                        title="previous chapter">8.3.21. register</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="shutdown.html"
                        title="next chapter">8.3.23. shutdown</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/reference/commands/select.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="shutdown.html" title="8.3.23. shutdown"
             >next</a> |</li>
        <li class="right" >
          <a href="register.html" title="8.3.21. register"
             >previous</a> |</li>
        <li><a href="../../index.html">groonga v3.0.5 documentation</a> &raquo;</li>
          <li><a href="../../reference.html" >8. リファレンスマニュアル</a> &raquo;</li>
          <li><a href="../command.html" >8.3. Command</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>