Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > 7ccba03a8b2ff4bf6e75bb07a270a9d9 > files > 90

libxapian-devel-1.2.12-3.mga3.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Xapian: API Documentation: xapian-core: Xapian::Document Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.5.9 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceXapian.html">Xapian</a>::<a class="el" href="classXapian_1_1Document.html">Document</a>
  </div>
</div>
<div class="contents">
<h1>Xapian::Document Class Reference</h1><!-- doxytag: class="Xapian::Document" -->A handle representing a document in a <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> database.  
<a href="#_details">More...</a>
<p>

<p>
<a href="classXapian_1_1Document-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#27316171adc74325e42d5e88b004e189">Document</a> (const <a class="el" href="classXapian_1_1Document.html">Document</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copying is allowed.  <a href="#27316171adc74325e42d5e88b004e189"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#470144b154e9a7ec40b0875a8d636b9b">operator=</a> (const <a class="el" href="classXapian_1_1Document.html">Document</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment is allowed.  <a href="#470144b154e9a7ec40b0875a8d636b9b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e75d6c6a48b1cfed5b85189cb766531b"></a><!-- doxytag: member="Xapian::Document::Document" ref="e75d6c6a48b1cfed5b85189cb766531b" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#e75d6c6a48b1cfed5b85189cb766531b">Document</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Make a new empty <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database.">Document</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="943a905545bd862dbc7281e6d66e5ee4"></a><!-- doxytag: member="Xapian::Document::~Document" ref="943a905545bd862dbc7281e6d66e5ee4" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#943a905545bd862dbc7281e6d66e5ee4">~Document</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#1d8567908657c0d60a47c7ca30a08ebc">get_value</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get value by number.  <a href="#1d8567908657c0d60a47c7ca30a08ebc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#12857fccd3448ec1db91311c16d67f6c">add_value</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot, const std::string &amp;value)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new value.  <a href="#12857fccd3448ec1db91311c16d67f6c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ffd0e3d1beb8f047b3158a5e5aa41d4"></a><!-- doxytag: member="Xapian::Document::remove_value" ref="6ffd0e3d1beb8f047b3158a5e5aa41d4" args="(Xapian::valueno slot)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#6ffd0e3d1beb8f047b3158a5e5aa41d4">remove_value</a> (<a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a> slot)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove any value with the given number. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99f8cb1deeab46df42fed52ea4f55eb9"></a><!-- doxytag: member="Xapian::Document::clear_values" ref="99f8cb1deeab46df42fed52ea4f55eb9" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#99f8cb1deeab46df42fed52ea4f55eb9">clear_values</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all values associated with the document. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#767026a91f3a1421f3d23f7a170509d4">get_data</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get data stored in the document.  <a href="#767026a91f3a1421f3d23f7a170509d4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#b1b0da2e7c76acd754f29a52e14f89ae">set_data</a> (const std::string &amp;data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set data stored in the document.  <a href="#b1b0da2e7c76acd754f29a52e14f89ae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#161943bb133fea0da4a21fa37621764b">add_posting</a> (const std::string &amp;tname, <a class="el" href="namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45">Xapian::termpos</a> tpos, <a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> wdfinc=1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add an occurrence of a term at a particular position.  <a href="#161943bb133fea0da4a21fa37621764b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#730bb59dda98f19c61fe67360f0adb3a">add_term</a> (const std::string &amp;tname, <a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> wdfinc=1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a term to the document, without positional information.  <a href="#730bb59dda98f19c61fe67360f0adb3a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#5dcc3df00ccb9ab3a8dee594f603d299">add_boolean_term</a> (const std::string &amp;term)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a boolean filter term to the document.  <a href="#5dcc3df00ccb9ab3a8dee594f603d299"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#11eec629737e496a7077b87f763967a5">remove_posting</a> (const std::string &amp;tname, <a class="el" href="namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45">Xapian::termpos</a> tpos, <a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> wdfdec=1)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a posting of a term from the document.  <a href="#11eec629737e496a7077b87f763967a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#01e5b7bf54fdee77a978c3b5f1b007ba">remove_term</a> (const std::string &amp;tname)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove a term and all postings associated with it.  <a href="#01e5b7bf54fdee77a978c3b5f1b007ba"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0bd9e001ffd29b0678938522d4e37e5"></a><!-- doxytag: member="Xapian::Document::clear_terms" ref="a0bd9e001ffd29b0678938522d4e37e5" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#a0bd9e001ffd29b0678938522d4e37e5">clear_terms</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove all terms (and postings) from the document. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#0249ddf18171ed53d851f9d82290eb62">termlist_count</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The length of the termlist - i.e.  <a href="#0249ddf18171ed53d851f9d82290eb62"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="591cc11740bd0b293eaa77f117b7f0d6"></a><!-- doxytag: member="Xapian::Document::termlist_begin" ref="591cc11740bd0b293eaa77f117b7f0d6" args="() const " -->
<a class="el" href="classXapian_1_1TermIterator.html">TermIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#591cc11740bd0b293eaa77f117b7f0d6">termlist_begin</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterator for the terms in this document. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b4ba488b850b48b4972bb4e5f8ccf241"></a><!-- doxytag: member="Xapian::Document::termlist_end" ref="b4ba488b850b48b4972bb4e5f8ccf241" args="() const " -->
<a class="el" href="classXapian_1_1TermIterator.html">TermIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#b4ba488b850b48b4972bb4e5f8ccf241">termlist_end</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Equivalent end iterator for <a class="el" href="classXapian_1_1Document.html#591cc11740bd0b293eaa77f117b7f0d6" title="Iterator for the terms in this document.">termlist_begin()</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="139251ac7b57e67703f797b06793d21c"></a><!-- doxytag: member="Xapian::Document::values_count" ref="139251ac7b57e67703f797b06793d21c" args="() const " -->
<a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#139251ac7b57e67703f797b06793d21c">values_count</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Count the values in this document. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1ed6315d39adbc6f3e19d7bcc95ad3fe"></a><!-- doxytag: member="Xapian::Document::values_begin" ref="1ed6315d39adbc6f3e19d7bcc95ad3fe" args="() const " -->
<a class="el" href="classXapian_1_1ValueIterator.html">ValueIterator</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#1ed6315d39adbc6f3e19d7bcc95ad3fe">values_begin</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Iterator for the values in this document. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f398562da8181e9eb37bb4df75aa33e"></a><!-- doxytag: member="Xapian::Document::values_end" ref="9f398562da8181e9eb37bb4df75aa33e" args="() const " -->
ValueIteratorEnd_&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#9f398562da8181e9eb37bb4df75aa33e">values_end</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Equivalent end iterator for <a class="el" href="classXapian_1_1Document.html#1ed6315d39adbc6f3e19d7bcc95ad3fe" title="Iterator for the values in this document.">values_begin()</a>. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">docid</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#03ff36283ac7d14a1a3b1c9fb26eff61">get_docid</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the document id which is associated with this document (if any).  <a href="#03ff36283ac7d14a1a3b1c9fb26eff61"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#d6a7536cd6ed7c5b3fe4c9f1d14d6faf">serialise</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serialise document into a string.  <a href="#d6a7536cd6ed7c5b3fe4c9f1d14d6faf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb93627c7cb0556c0935d5c2bb4f0847"></a><!-- doxytag: member="Xapian::Document::get_description" ref="eb93627c7cb0556c0935d5c2bb4f0847" args="() const " -->
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#eb93627c7cb0556c0935d5c2bb4f0847">get_description</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a string describing this object. <br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d7618710ea495101e4799fbe1952a41"></a><!-- doxytag: member="Xapian::Document::unserialise" ref="3d7618710ea495101e4799fbe1952a41" args="(const std::string &amp;s)" -->
static <a class="el" href="classXapian_1_1Document.html">Document</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classXapian_1_1Document.html#3d7618710ea495101e4799fbe1952a41">unserialise</a> (const std::string &amp;s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Unserialise a document from a string produced by <a class="el" href="classXapian_1_1Document.html#d6a7536cd6ed7c5b3fe4c9f1d14d6faf" title="Serialise document into a string.">serialise()</a>. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A handle representing a document in a <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> database. 
<p>
The <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database.">Document</a> class fetches information from the database lazily. Usually this behaviour isn't visible to users (except for the speed benefits), but if the document in the database is modified or deleted, then preexisting <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database.">Document</a> objects may return the old or new versions of data (or throw <a class="el" href="classXapian_1_1DocNotFoundError.html" title="Indicates an attempt to access a document not present in the database.">Xapian::DocNotFoundError</a> in the case of deletion).<p>
Since <a class="el" href="classXapian_1_1Database.html" title="This class is used to access a database, or a group of databases.">Database</a> objects work on a snapshot of the database's state, the situation above can only happen with a <a class="el" href="classXapian_1_1WritableDatabase.html" title="This class provides read/write access to a database.">WritableDatabase</a> object, or if you call <a class="el" href="classXapian_1_1Database.html#f140b1f8d948d13cf7be4a11a7c699a4" title="Re-open the database.">Database::reopen()</a> on a <a class="el" href="classXapian_1_1Database.html" title="This class is used to access a database, or a group of databases.">Database</a> object.<p>
We recommend you avoid designs where this behaviour is an issue, but if you need a way to make a non-lazy version of a <a class="el" href="classXapian_1_1Document.html" title="A handle representing a document in a Xapian database.">Document</a> object, you can do this like so:<p>
doc = <a class="el" href="classXapian_1_1Document.html#3d7618710ea495101e4799fbe1952a41" title="Unserialise a document from a string produced by serialise().">Xapian::Document::unserialise</a>(doc.serialise()); <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="27316171adc74325e42d5e88b004e189"></a><!-- doxytag: member="Xapian::Document::Document" ref="27316171adc74325e42d5e88b004e189" args="(const Document &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Xapian::Document::Document           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXapian_1_1Document.html">Document</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copying is allowed. 
<p>
The internals are reference counted, so copying is cheap.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>The object to copy. </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="5dcc3df00ccb9ab3a8dee594f603d299"></a><!-- doxytag: member="Xapian::Document::add_boolean_term" ref="5dcc3df00ccb9ab3a8dee594f603d299" args="(const std::string &amp;term)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::add_boolean_term           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>term</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a boolean filter term to the document. 
<p>
This method adds <em>term</em> to the document with wdf of 0 - this is generally what you want for a term used for boolean filtering as the wdf of such terms is ignored, and it doesn't make sense for them to contribute to the document's length.<p>
If the specified term already indexes this document, this method has no effect.<p>
It is exactly the same as add_term(term, 0).<p>
This method was added in <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> 1.0.18.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>term</em>&nbsp;</td><td>The term to add. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="161943bb133fea0da4a21fa37621764b"></a><!-- doxytag: member="Xapian::Document::add_posting" ref="161943bb133fea0da4a21fa37621764b" args="(const std::string &amp;tname, Xapian::termpos tpos, Xapian::termcount wdfinc=1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::add_posting           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>tname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45">Xapian::termpos</a>&nbsp;</td>
          <td class="paramname"> <em>tpos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>wdfinc</em> = <code>1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add an occurrence of a term at a particular position. 
<p>
Multiple occurrences of the term at the same position are represented only once in the positional information, but do increase the wdf.<p>
If the term is not already in the document, it will be added to it.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>tname</em>&nbsp;</td><td>The name of the term. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tpos</em>&nbsp;</td><td>The position of the term. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>wdfinc</em>&nbsp;</td><td>The increment that will be applied to the wdf for this term. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="730bb59dda98f19c61fe67360f0adb3a"></a><!-- doxytag: member="Xapian::Document::add_term" ref="730bb59dda98f19c61fe67360f0adb3a" args="(const std::string &amp;tname, Xapian::termcount wdfinc=1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::add_term           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>tname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>wdfinc</em> = <code>1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a term to the document, without positional information. 
<p>
Any existing positional information for the term will be left unmodified.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>tname</em>&nbsp;</td><td>The name of the term. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>wdfinc</em>&nbsp;</td><td>The increment that will be applied to the wdf for this term (default: 1). </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="12857fccd3448ec1db91311c16d67f6c"></a><!-- doxytag: member="Xapian::Document::add_value" ref="12857fccd3448ec1db91311c16d67f6c" args="(Xapian::valueno slot, const std::string &amp;value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::add_value           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&nbsp;</td>
          <td class="paramname"> <em>slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add a new value. 
<p>
The new value will replace any existing value with the same number (or if the new value is empty, it will remove any existing value with the same number).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>slot</em>&nbsp;</td><td>The value slot to add the value in. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value to set. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="767026a91f3a1421f3d23f7a170509d4"></a><!-- doxytag: member="Xapian::Document::get_data" ref="767026a91f3a1421f3d23f7a170509d4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Xapian::Document::get_data           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get data stored in the document. 
<p>
This is potentially a relatively expensive operation, and shouldn't normally be used during the match (e.g. in a <a class="el" href="classXapian_1_1PostingSource.html" title="Base class which provides an &quot;external&quot; source of postings.">PostingSource</a> or match decider functor. Put data for use by match deciders in a value instead. 
</div>
</div><p>
<a class="anchor" name="03ff36283ac7d14a1a3b1c9fb26eff61"></a><!-- doxytag: member="Xapian::Document::get_docid" ref="03ff36283ac7d14a1a3b1c9fb26eff61" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#8fa9094bebe1256a7be935a5ede87a64">docid</a> Xapian::Document::get_docid           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the document id which is associated with this document (if any). 
<p>
NB If multiple databases are being searched together, then this will be the document id in the individual database, not the merged database!<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>If this document came from a database, return the document id in that database. Otherwise, return 0 (in <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> 1.0.22/1.2.4 or later; prior to this the returned value was uninitialised). </dd></dl>

</div>
</div><p>
<a class="anchor" name="1d8567908657c0d60a47c7ca30a08ebc"></a><!-- doxytag: member="Xapian::Document::get_value" ref="1d8567908657c0d60a47c7ca30a08ebc" args="(Xapian::valueno slot) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Xapian::Document::get_value           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#94a899651fa920c72ffa9635bde630ea">Xapian::valueno</a>&nbsp;</td>
          <td class="paramname"> <em>slot</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get value by number. 
<p>
Returns an empty string if no value with the given number is present in the document.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>slot</em>&nbsp;</td><td>The number of the value. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="470144b154e9a7ec40b0875a8d636b9b"></a><!-- doxytag: member="Xapian::Document::operator=" ref="470144b154e9a7ec40b0875a8d636b9b" args="(const Document &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::operator=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classXapian_1_1Document.html">Document</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Assignment is allowed. 
<p>
The internals are reference counted, so assignment is cheap.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>The object to copy. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="11eec629737e496a7077b87f763967a5"></a><!-- doxytag: member="Xapian::Document::remove_posting" ref="11eec629737e496a7077b87f763967a5" args="(const std::string &amp;tname, Xapian::termpos tpos, Xapian::termcount wdfdec=1)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::remove_posting           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>tname</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#e5a16f073d0c8ed54085a9de07248d45">Xapian::termpos</a>&nbsp;</td>
          <td class="paramname"> <em>tpos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a>&nbsp;</td>
          <td class="paramname"> <em>wdfdec</em> = <code>1</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove a posting of a term from the document. 
<p>
Note that the term will still index the document even if all occurrences are removed. To remove a term from a document completely, use <a class="el" href="classXapian_1_1Document.html#01e5b7bf54fdee77a978c3b5f1b007ba" title="Remove a term and all postings associated with it.">remove_term()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>tname</em>&nbsp;</td><td>The name of the term. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tpos</em>&nbsp;</td><td>The position of the term. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>wdfdec</em>&nbsp;</td><td>The decrement that will be applied to the wdf when removing this posting. The wdf will not go below the value of 0.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API.">Xapian::InvalidArgumentError</a></em>&nbsp;</td><td>will be thrown if the term is not at the position specified in the position list for this term in this document.</td></tr>
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API.">Xapian::InvalidArgumentError</a></em>&nbsp;</td><td>will be thrown if the term is not in the document </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="01e5b7bf54fdee77a978c3b5f1b007ba"></a><!-- doxytag: member="Xapian::Document::remove_term" ref="01e5b7bf54fdee77a978c3b5f1b007ba" args="(const std::string &amp;tname)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::remove_term           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>tname</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Remove a term and all postings associated with it. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>tname</em>&nbsp;</td><td>The name of the term.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classXapian_1_1InvalidArgumentError.html" title="InvalidArgumentError indicates an invalid parameter value was passed to the API.">Xapian::InvalidArgumentError</a></em>&nbsp;</td><td>will be thrown if the term is not in the document </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="d6a7536cd6ed7c5b3fe4c9f1d14d6faf"></a><!-- doxytag: member="Xapian::Document::serialise" ref="d6a7536cd6ed7c5b3fe4c9f1d14d6faf" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Xapian::Document::serialise           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Serialise document into a string. 
<p>
The document representation may change between <a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> releases: even between minor versions. However, it is guaranteed not to change if the remote database protocol has not changed between releases. 
</div>
</div><p>
<a class="anchor" name="b1b0da2e7c76acd754f29a52e14f89ae"></a><!-- doxytag: member="Xapian::Document::set_data" ref="b1b0da2e7c76acd754f29a52e14f89ae" args="(const std::string &amp;data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Xapian::Document::set_data           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>data</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set data stored in the document. 
<p>
<a class="el" href="namespaceXapian.html" title="The Xapian namespace contains public interfaces for the Xapian library.">Xapian</a> treats the data as an opaque blob. It may try to compress it, but other than that it will just store it and return it when requested.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The data to store. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="0249ddf18171ed53d851f9d82290eb62"></a><!-- doxytag: member="Xapian::Document::termlist_count" ref="0249ddf18171ed53d851f9d82290eb62" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceXapian.html#72b5a76dd8cfb7b251fe7986e86390cb">Xapian::termcount</a> Xapian::Document::termlist_count           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The length of the termlist - i.e. 
<p>
the number of different terms which index this document. 
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>xapian/<a class="el" href="document_8h.html">document.h</a></ul>
</div>
<hr>
<address><small>
Documentation for Xapian (version 1.2.12).<br>
Generated on 27 Jun 2012 by
<a href="http://www.doxygen.org/">Doxygen 1.5.9</a>.
</small></address>
</body>
</html>