Sophie

Sophie

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

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.11.5. html_untag &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.11. Function" href="../function.html" />
    <link rel="next" title="8.11.6. now" href="now.html" />
    <link rel="prev" title="8.11.4. geo_in_rectangle" href="geo_in_rectangle.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/functions/html_untag.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="now.html" title="8.11.6. now"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="geo_in_rectangle.html" title="8.11.4. geo_in_rectangle"
             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="../function.html" accesskey="U">8.11. Function</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="html-untag">
<h1>8.11.5. html_untag<a class="headerlink" href="#html-untag" title="Permalink to this headline">¶</a></h1>
<div class="section" id="summary">
<h2>8.11.5.1. Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">html_untag</span></tt> strips HTML tags from HTML and outputs plain text.</p>
<p><tt class="docutils literal"><span class="pre">html_untag</span></tt> is used in <tt class="docutils literal"><span class="pre">--output_columns</span></tt> described at <a class="reference internal" href="../commands/select.html"><em>select</em></a>.</p>
</div>
<div class="section" id="syntax">
<h2>8.11.5.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">html_untag</span></tt> requires only one argument. It is <tt class="docutils literal"><span class="pre">column</span></tt>.</p>
<div class="highlight-none"><div class="highlight"><pre>html_untag(column)
</pre></div>
</div>
</div>
<div class="section" id="usage">
<h2>8.11.5.3. Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<p>Here are a schema definition and sample data to show usage.</p>
<p>Sample schema:</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>table_create WebClips TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create WebClips url COLUMN_SCALAR ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create WebClips content COLUMN_SCALAR ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create WebClips tag COLUMN_VECTOR ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
</pre></div>
</div>
<p>Sample data:</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>load --table WebClips
[
{&quot;_key&quot;: 1, &quot;url&quot;: &quot;http://groonga.org&quot;, &quot;tag&quot;: [&quot;groonga&quot;], &quot;content&quot;: &quot;groonga is &lt;span class=&#39;emphasize&#39;&gt;fast&lt;/span&gt;&quot;},
{&quot;_key&quot;: 2, &quot;url&quot;: &quot;http://mroonga.org&quot;, &quot;tag&quot;: [&quot;mroonga&quot;], &quot;content&quot;: &quot;mroonga is &lt;span class=\&quot;emphasize\&quot;&gt;fast&lt;/span&gt;&quot;},
]
# [[0, 1337566253.89858, 0.000355720520019531], 2]
</pre></div>
</div>
<p>Here is the simple usage of <tt class="docutils literal"><span class="pre">html_untag</span></tt> function which strips HTML tags from content of column.</p>
<p>Execution example:</p>
<div class="highlight-none"><div class="highlight"><pre>select WebClips --output_columns &quot;_key, html_untag(content)&quot; --command_version 2
# [
#   [
#     0,
#     1337566253.89858,
#     0.000355720520019531
#   ],
#   [
#     [
#       [
#         2
#       ],
#       [
#         [
#           &quot;html_untag&quot;,
#           &quot;null&quot;
#         ]
#       ],
#       [
#         &quot;groonga is fast&quot;
#       ],
#       [
#         &quot;mroonga is fast&quot;
#       ]
#     ]
#   ]
# ]
</pre></div>
</div>
<p>When executing the above query, you can see &quot;span&quot; tag with &quot;class&quot; attribute is stripped.
Note that you must specify <tt class="docutils literal"><span class="pre">--command_version</span> <span class="pre">2</span></tt> to use <tt class="docutils literal"><span class="pre">html_untag</span></tt> function.</p>
</div>
<div class="section" id="parameters">
<h2>8.11.5.4. Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h2>
<p>There is one required parameter, <tt class="docutils literal"><span class="pre">column</span></tt>.</p>
<div class="section" id="column">
<h3>8.11.5.4.1. <tt class="docutils literal"><span class="pre">column</span></tt><a class="headerlink" href="#column" title="Permalink to this headline">¶</a></h3>
<p>It specifies a column of the table.</p>
</div>
</div>
<div class="section" id="return-value">
<h2>8.11.5.5. Return value<a class="headerlink" href="#return-value" title="Permalink to this headline">¶</a></h2>
<p><tt class="docutils literal"><span class="pre">html_untag</span></tt> returns plain text which is stripped HTML tags from content of column.</p>
</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.11.5. html_untag</a><ul>
<li><a class="reference internal" href="#summary">8.11.5.1. Summary</a></li>
<li><a class="reference internal" href="#syntax">8.11.5.2. Syntax</a></li>
<li><a class="reference internal" href="#usage">8.11.5.3. Usage</a></li>
<li><a class="reference internal" href="#parameters">8.11.5.4. Parameters</a><ul>
<li><a class="reference internal" href="#column">8.11.5.4.1. <tt class="docutils literal"><span class="pre">column</span></tt></a></li>
</ul>
</li>
<li><a class="reference internal" href="#return-value">8.11.5.5. Return value</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="geo_in_rectangle.html"
                        title="previous chapter">8.11.4. geo_in_rectangle</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="now.html"
                        title="next chapter">8.11.6. now</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/reference/functions/html_untag.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="now.html" title="8.11.6. now"
             >next</a> |</li>
        <li class="right" >
          <a href="geo_in_rectangle.html" title="8.11.4. geo_in_rectangle"
             >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="../function.html" >8.11. Function</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2013, Brazil, Inc.
    </div>
  </body>
</html>