Added: lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/ORQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,122 @@ +Title: Lucy::Search::ORQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::ORQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>ORQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>ORQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>ORQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/ORQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::ORQuery â Union multiple result sets.</p> +<h3>Description</h3> +<p>ORQuery is a composite <a href="../../Lucy/Search/Query.html">Query</a> which matches +when any of its children match, so its result set is the union of their +result sets. Matching documents recieve a summed score from all matching +child Queries.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>ORQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ORQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>children</strong> +); +</code></pre> +<p>Create a new ORQuery.</p> +<dl> +<dt>children</dt> +<dd><p>An array of child Queries.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>ORQuery* +<span class="prefix">lucy_</span><strong>ORQuery_init</strong>( + <span class="prefix">lucy_</span>ORQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>children</strong> +); +</code></pre> +<p>Initialize an ORQuery.</p> +<dl> +<dt>children</dt> +<dd><p>An array of child Queries.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ORQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>ORQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ORQuery_To_String</strong>( + <span class="prefix">lucy_</span>ORQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>ORQuery_Equals</strong>( + <span class="prefix">lucy_</span>ORQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::ORQuery is a <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div>
Added: lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/PhraseQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,173 @@ +Title: Lucy::Search::PhraseQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::PhraseQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>PHRASEQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>PhraseQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>PhraseQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/PhraseQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::PhraseQuery â Query matching an ordered list of terms.</p> +<h3>Description</h3> +<p>PhraseQuery is a subclass of <a href="../../Lucy/Search/Query.html">Query</a> for matching +against an ordered sequence of terms.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>PhraseQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PhraseQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>terms</strong> +); +</code></pre> +<p>Create a new PhraseQuery.</p> +<dl> +<dt>field</dt> +<dd><p>The field that the phrase must occur in.</p> +</dd> +<dt>terms</dt> +<dd><p>The ordered array of terms that must match.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>PhraseQuery* +<span class="prefix">lucy_</span><strong>PhraseQuery_init</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>terms</strong> +); +</code></pre> +<p>Initialize a PhraseQuery.</p> +<dl> +<dt>field</dt> +<dd><p>The field that the phrase must occur in.</p> +</dd> +<dt>terms</dt> +<dd><p>The ordered array of terms that must match.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>PhraseQuery_Get_Field</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs field attribute.</p> +</dd> +<dt id="func_Get_Terms">Get_Terms</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a>* +<span class="prefix">lucy_</span><strong>PhraseQuery_Get_Terms</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs array of terms.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PhraseQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>PhraseQuery_Equals</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PhraseQuery_To_String</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PhraseQuery_Dump</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PhraseQuery_Load</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>PhraseQuery_Destroy</strong>( + <span class="prefix">lucy_</span>PhraseQuery *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::PhraseQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/PolyQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/PolyQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/PolyQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/PolyQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,95 @@ +Title: Lucy::Search::PolyQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::PolyQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>POLYQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>PolyQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>PolyQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/PolyQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::PolyQuery â Base class for composite Query objects.</p> +<h3>Description</h3> +<p>PolyQuery serves as a shared base class for +<a href="../../Lucy/Search/ANDQuery.html">ANDQuery</a>, +<a href="../../Lucy/Search/ORQuery.html">ORQuery</a>, +<a href="../../Lucy/Search/NOTQuery.html">NOTQuery</a>, and +<a href="../../Lucy/Search/RequiredOptionalQuery.html">RequiredOptionalQuery</a>. All of +these classes may serve as nodes in composite Query with a tree structure +which may be walked.</p> +<h3>Methods</h3> +<dl> +<dt id="func_Add_Child">Add_Child</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>PolyQuery_Add_Child</strong>( + <span class="prefix">lucy_</span>PolyQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong> +); +</code></pre> +<p>Add a child Query node.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PolyQuery_Dump</strong>( + <span class="prefix">lucy_</span>PolyQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PolyQuery_Load</strong>( + <span class="prefix">lucy_</span>PolyQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>PolyQuery_Equals</strong>( + <span class="prefix">lucy_</span>PolyQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>PolyQuery_Destroy</strong>( + <span class="prefix">lucy_</span>PolyQuery *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::PolyQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/PolySearcher.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/PolySearcher.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/PolySearcher.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/PolySearcher.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,154 @@ +Title: Lucy::Search::PolySearcher â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::PolySearcher</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>POLYSEARCHER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>PolySearcher</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>PolySearcher</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/PolySearcher.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::PolySearcher â Aggregate results from multiple Searchers.</p> +<h3>Description</h3> +<p>The primary use for PolySearcher is to aggregate results from several +indexes on a single machine.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>PolySearcher* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PolySearcher_new</strong>( + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>searchers</strong> +); +</code></pre> +<p>Create a new PolySearcher.</p> +<dl> +<dt>schema</dt> +<dd><p>A Schema.</p> +</dd> +<dt>searchers</dt> +<dd><p>An array of Searchers.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>PolySearcher* +<span class="prefix">lucy_</span><strong>PolySearcher_init</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>searchers</strong> +); +</code></pre> +<p>Initialize a PolySearcher.</p> +<dl> +<dt>schema</dt> +<dd><p>A Schema.</p> +</dd> +<dt>searchers</dt> +<dd><p>An array of Searchers.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>PolySearcher_Destroy</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +<dt id="func_Doc_Max">Doc_Max</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>PolySearcher_Doc_Max</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong> +); +</code></pre> +<p>Return the maximum number of docs in the collection represented by the +Searcher, which is also the highest possible internal doc id. +Documents which have been marked as deleted but not yet purged are +included in this count.</p> +</dd> +<dt id="func_Doc_Freq">Doc_Freq</dt> +<dd> +<pre><code>uint32_t +<span class="prefix">lucy_</span><strong>PolySearcher_Doc_Freq</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Return the number of documents which contain the term in the given +field.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>The term to look up.</p> +</dd> +</dl> +</dd> +<dt id="func_Collect">Collect</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>PolySearcher_Collect</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Collector.html">Collector</a> *<strong>collector</strong> +); +</code></pre> +<p>Iterate over hits, feeding them into a +<a href="../../Lucy/Search/Collector.html">Collector</a>.</p> +<dl> +<dt>query</dt> +<dd><p>A Query.</p> +</dd> +<dt>collector</dt> +<dd><p>A Collector.</p> +</dd> +</dl> +</dd> +<dt id="func_Fetch_Doc">Fetch_Doc</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Document/HitDoc.html">HitDoc</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>PolySearcher_Fetch_Doc</strong>( + <span class="prefix">lucy_</span>PolySearcher *<strong>self</strong>, + int32_t <strong>doc_id</strong> +); +</code></pre> +<p>Retrieve a document. Throws an error if the doc id is out of range.</p> +<dl> +<dt>doc_id</dt> +<dd><p>A document id.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::PolySearcher is a <a href="../../Lucy/Search/Searcher.html">Lucy::Search::Searcher</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/Query.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/Query.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/Query.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/Query.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,130 @@ +Title: Lucy::Search::Query â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::Query</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>QUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Query</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Query</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/Query.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::Query â A specification for a search query.</p> +<h3>Description</h3> +<p>Query objects are simple containers which contain the minimum information +necessary to define a search query.</p> +<p>The most common way to generate Query objects is to feed a search string +such as âfoo AND barâ to a <a href="../../Lucy/Search/QueryParser.html">QueryParserâs</a> +<a href="../../Lucy/Search/QueryParser.html#func_Parse">Parse()</a> method, which outputs an abstract syntax tree built up from various +Query subclasses such as <a href="../../Lucy/Search/ANDQuery.html">ANDQuery</a> and +<a href="../../Lucy/Search/TermQuery.html">TermQuery</a>. However, it is also possible +to use custom Query objects to build a search specification which cannot be +easily represented using a search string.</p> +<p>Subclasses of Query must implement <a href="../../Lucy/Search/Query.html#func_Make_Compiler">Make_Compiler()</a>, which is the first step +in compiling a Query down to a <a href="../../Lucy/Search/Matcher.html">Matcher</a> which +can actually match and score documents.</p> +<h3>Functions</h3> +<dl> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Query* +<span class="prefix">lucy_</span><strong>Query_init</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong>, + float <strong>boost</strong> +); +</code></pre> +<p>Abstract initializer.</p> +<dl> +<dt>boost</dt> +<dd><p>A scoring multiplier, affecting the Queryâs relative +contribution to each documentâs score. Typically defaults to 1.0, but +subclasses which do not contribute to document scores such as NOTQuery +and MatchAllQuery default to 0.0 instead.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Make_Compiler">Make_Compiler <span class="comment">(abstract)</span></dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Query_Make_Compiler</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_Set_Boost">Set_Boost</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Query_Set_Boost</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong>, + float <strong>boost</strong> +); +</code></pre> +<p>Set the Queryâs boost.</p> +</dd> +<dt id="func_Get_Boost">Get_Boost</dt> +<dd> +<pre><code>float +<span class="prefix">lucy_</span><strong>Query_Get_Boost</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong> +); +</code></pre> +<p>Get the Queryâs boost.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Query_Dump</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Query_Load</strong>( + <span class="prefix">lucy_</span>Query *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::Query is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/QueryParser.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/QueryParser.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/QueryParser.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/QueryParser.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,367 @@ +Title: Lucy::Search::QueryParser â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::QueryParser</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>QUERYPARSER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>QueryParser</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>QParser</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/QueryParser.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::QueryParser â Transform a string into a Query object.</p> +<h3>Description</h3> +<p>QueryParser accepts search strings as input and produces +<a href="../../Lucy/Search/Query.html">Query</a> objects, suitable for feeding into +<a href="../../Lucy/Search/IndexSearcher.html">IndexSearcher</a> and other +<a href="../../Lucy/Search/Searcher.html">Searcher</a> subclasses.</p> +<p>The following syntactical constructs are recognized by QueryParser:</p> +<ul> +<li>Boolean operators âANDâ, âORâ, and âAND NOTâ.</li> +<li>Prepented +plus and -minus, indicating that the labeled entity +should be either required or forbidden â be it a single word, a +phrase, or a parenthetical group.</li> +<li>Logical groups, delimited by parentheses.</li> +<li>Phrases, delimited by double quotes.</li> +</ul> +<p>Additionally, the following syntax can be enabled via <a href="../../Lucy/Search/QueryParser.html#func_Set_Heed_Colons">Set_Heed_Colons()</a>:</p> +<ul> +<li>Field-specific constructs, in the form of âfieldname:termtextâ or +âfieldname:(foo bar)â. (The field specified by âfieldname:â will be +used instead of the QueryParserâs default fields).</li> +</ul> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>QueryParser* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_new</strong>( + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a> *<strong>analyzer</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>default_boolop</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>fields</strong> +); +</code></pre> +<p>Constructor.</p> +<dl> +<dt>schema</dt> +<dd><p>A <a href="../../Lucy/Plan/Schema.html">Schema</a>.</p> +</dd> +<dt>analyzer</dt> +<dd><p>An <a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a>. +Ordinarily, the analyzers specified by each fieldâs definition will be +used, but if <code>analyzer</code> is supplied, it will override and be used for +all fields. This can lead to mismatches between what is in the index +and what is being searched for, so use caution.</p> +</dd> +<dt>fields</dt> +<dd><p>The names of the fields which will be searched against. +Defaults to those fields which are defined as indexed in the supplied +Schema.</p> +</dd> +<dt>default_boolop</dt> +<dd><p>Two possible values: âANDâ and âORâ. The default +is âORâ, which means: return documents which match any of the query +terms. If you want only documents which match all of the query terms, +set this to âANDâ.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>QueryParser* +<span class="prefix">lucy_</span><strong>QParser_init</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a> *<strong>analyzer</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>default_boolop</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>fields</strong> +); +</code></pre> +<p>Initialize a QueryParser.</p> +<dl> +<dt>schema</dt> +<dd><p>A <a href="../../Lucy/Plan/Schema.html">Schema</a>.</p> +</dd> +<dt>analyzer</dt> +<dd><p>An <a href="../../Lucy/Analysis/Analyzer.html">Analyzer</a>. +Ordinarily, the analyzers specified by each fieldâs definition will be +used, but if <code>analyzer</code> is supplied, it will override and be used for +all fields. This can lead to mismatches between what is in the index +and what is being searched for, so use caution.</p> +</dd> +<dt>fields</dt> +<dd><p>The names of the fields which will be searched against. +Defaults to those fields which are defined as indexed in the supplied +Schema.</p> +</dd> +<dt>default_boolop</dt> +<dd><p>Two possible values: âANDâ and âORâ. The default +is âORâ, which means: return documents which match any of the query +terms. If you want only documents which match all of the query terms, +set this to âANDâ.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Parse">Parse</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Parse</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>query_string</strong> +); +</code></pre> +<p>Build a Query object from the contents of a query string. At present, +implemented internally by calling <a href="../../Lucy/Search/QueryParser.html#func_Tree">Tree()</a>, <a href="../../Lucy/Search/QueryParser.html#func_Expand">Expand()</a>, and <a href="../../Lucy/Search/QueryParser.html#func_Prune">Prune()</a>.</p> +<dl> +<dt>query_string</dt> +<dd><p>The string to be parsed. May be NULL.</p> +</dd> +</dl> +<p><strong>Returns:</strong> a Query.</p> +</dd> +<dt id="func_Tree">Tree</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Tree</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>query_string</strong> +); +</code></pre> +<p>Parse the logical structure of a query string, building a tree +comprised of Query objects. Leaf nodes in the tree will most often be +LeafQuery objects but might be MatchAllQuery or NoMatchQuery objects as +well. Internal nodes will be objects which subclass PolyQuery: +ANDQuery, ORQuery, NOTQuery, and RequiredOptionalQuery.</p> +<p>The output of <a href="../../Lucy/Search/QueryParser.html#func_Tree">Tree()</a> is an intermediate form which must be passed +through <a href="../../Lucy/Search/QueryParser.html#func_Expand">Expand()</a> before being used to feed a search.</p> +<dl> +<dt>query_string</dt> +<dd><p>The string to be parsed.</p> +</dd> +</dl> +<p><strong>Returns:</strong> a Query.</p> +</dd> +<dt id="func_Expand">Expand</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Expand</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong> +); +</code></pre> +<p>Walk the hierarchy of a Query tree, descending through all PolyQuery +nodes and calling <a href="../../Lucy/Search/QueryParser.html#func_Expand_Leaf">Expand_Leaf()</a> on any LeafQuery nodes encountered.</p> +<dl> +<dt>query</dt> +<dd><p>A Query object.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query â usually the same one that was supplied after +in-place modification, but possibly another.</p> +</dd> +<dt id="func_Expand_Leaf">Expand_Leaf</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Expand_Leaf</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong> +); +</code></pre> +<p>Convert a LeafQuery into either a TermQuery, a PhraseQuery, or an +ORQuery joining multiple TermQueries/PhraseQueries to accommodate +multiple fields. LeafQuery text will be passed through the relevant +Analyzer for each field. Quoted text will be transformed into +PhraseQuery objects. Unquoted text will be converted to either a +TermQuery or a PhraseQuery depending on how many tokens are generated.</p> +<dl> +<dt>query</dt> +<dd><p>A Query. Only LeafQuery objects will be processed; others +will be passed through.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Prune">Prune</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Prune</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong> +); +</code></pre> +<p>Prevent certain Query structures from returning too many results. +Query objects built via <a href="../../Lucy/Search/QueryParser.html#func_Tree">Tree()</a> and <a href="../../Lucy/Search/QueryParser.html#func_Expand">Expand()</a> can generate âreturn the +worldâ result sets, such as in the case of +<code>NOT a_term_not_in_the_index</code>; <a href="../../Lucy/Search/QueryParser.html#func_Prune">Prune()</a> walks the hierarchy +and eliminates such branches.</p> +<pre><code> 'NOT foo' => [NOMATCH] + 'foo OR NOT bar' => 'foo' + 'foo OR (-bar AND -baz) => 'foo' +</code></pre> +<p><a href="../../Lucy/Search/QueryParser.html#func_Prune">Prune()</a> also eliminates some double-negative constructs â even though +such constructs may not actually return the world:</p> +<pre><code> 'foo AND -(-bar)' => 'foo' +</code></pre> +<p>In this example, safety is taking precedence over logical consistency. +If you want logical consistency instead, call <a href="../../Lucy/Search/QueryParser.html#func_Tree">Tree()</a> then <a href="../../Lucy/Search/QueryParser.html#func_Expand">Expand()</a>, +skipping <a href="../../Lucy/Search/QueryParser.html#func_Prune">Prune()</a>.</p> +<dl> +<dt>query</dt> +<dd><p>A Query.</p> +</dd> +</dl> +<p><strong>Returns:</strong> a Query; in most cases, the supplied Query after in-place +modification.</p> +</dd> +<dt id="func_Make_Term_Query">Make_Term_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_Term_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Factory method creating a TermQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>Term text.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Make_Phrase_Query">Make_Phrase_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_Phrase_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>terms</strong> +); +</code></pre> +<p>Factory method creating a PhraseQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field that the phrase must occur in.</p> +</dd> +<dt>terms</dt> +<dd><p>Ordered array of terms that must match.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Make_OR_Query">Make_OR_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_OR_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>children</strong> +); +</code></pre> +<p>Factory method creating an ORQuery.</p> +<dl> +<dt>children</dt> +<dd><p>Array of child Queries.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Make_AND_Query">Make_AND_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_AND_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>children</strong> +); +</code></pre> +<p>Factory method creating an ANDQuery.</p> +<dl> +<dt>children</dt> +<dd><p>Array of child Queries.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Make_NOT_Query">Make_NOT_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_NOT_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>negated_query</strong> +); +</code></pre> +<p>Factory method creating a NOTQuery.</p> +<dl> +<dt>negated_query</dt> +<dd><p>Query to be inverted.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Make_Req_Opt_Query">Make_Req_Opt_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>QParser_Make_Req_Opt_Query</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>required_query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>optional_query</strong> +); +</code></pre> +<p>Factory method creating a RequiredOptionalQuery.</p> +<dl> +<dt>required_query</dt> +<dd><p>Query must must match.</p> +</dd> +<dt>optional_query</dt> +<dd><p>Query which should match.</p> +</dd> +</dl> +<p><strong>Returns:</strong> A Query.</p> +</dd> +<dt id="func_Set_Heed_Colons">Set_Heed_Colons</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>QParser_Set_Heed_Colons</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong>, + bool <strong>heed_colons</strong> +); +</code></pre> +<p>Enable/disable parsing of <code>fieldname:foo</code> constructs.</p> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>QParser_Destroy</strong>( + <span class="prefix">lucy_</span>QueryParser *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::QueryParser is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/RangeQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/RangeQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/RangeQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/RangeQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,169 @@ +Title: Lucy::Search::RangeQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::RangeQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>RANGEQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>RangeQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>RangeQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/RangeQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::RangeQuery â Match a range of values.</p> +<h3>Description</h3> +<p>RangeQuery matches documents where the value for a particular field falls +within a given range.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RangeQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RangeQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>lower_term</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>upper_term</strong>, + bool <strong>include_lower</strong>, + bool <strong>include_upper</strong> +); +</code></pre> +<p>Create a new RangeQuery.</p> +<p>Takes 5 parameters; <code>field</code> is required, as is at least one of either +<code>lower_term</code> or <code>upper_term</code>.</p> +<dl> +<dt>field</dt> +<dd><p>The name of a <code>sortable</code> field.</p> +</dd> +<dt>lower_term</dt> +<dd><p>Lower delimiter. If not supplied, all values +less than <code>upper_term</code> will pass.</p> +</dd> +<dt>upper_term</dt> +<dd><p>Upper delimiter. If not supplied, all values greater +than <code>lower_term</code> will pass.</p> +</dd> +<dt>include_lower</dt> +<dd><p>Indicates whether docs which match +<code>lower_term</code> should be included in the results.</p> +</dd> +<dt>include_upper</dt> +<dd><p>Indicates whether docs which match +<code>upper_term</code> should be included in the results.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RangeQuery* +<span class="prefix">lucy_</span><strong>RangeQuery_init</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>lower_term</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>upper_term</strong>, + bool <strong>include_lower</strong>, + bool <strong>include_upper</strong> +); +</code></pre> +<p>Initialize a RangeQuery. See <a href="../../Lucy/Search/RangeQuery.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>RangeQuery_Equals</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RangeQuery_To_String</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RangeQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RangeQuery_Dump</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RangeQuery_Load</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>RangeQuery_Destroy</strong>( + <span class="prefix">lucy_</span>RangeQuery *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::RangeQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/RequiredOptionalQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/RequiredOptionalQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/RequiredOptionalQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/RequiredOptionalQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,167 @@ +Title: Lucy::Search::RequiredOptionalQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::RequiredOptionalQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>REQUIREDOPTIONALQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>RequiredOptionalQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>ReqOptQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/RequiredOptionalQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::RequiredOptionalQuery â Join results for two Queries, one required, one optional.</p> +<h3>Description</h3> +<p>RequiredOptionalQuery joins the result sets of one Query which MUST match, +and one Query which SHOULD match. When only the required Query matches, +its score is passed along; when both match, the scores are summed.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RequiredOptionalQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ReqOptQuery_new</strong>( + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>required_query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>optional_query</strong> +); +</code></pre> +<p>Create a new RequiredOptionalQuery.</p> +<dl> +<dt>required_query</dt> +<dd><p>Query must must match.</p> +</dd> +<dt>optional_query</dt> +<dd><p>Query which should match.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RequiredOptionalQuery* +<span class="prefix">lucy_</span><strong>ReqOptQuery_init</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>required_query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>optional_query</strong> +); +</code></pre> +<p>Initialize a RequiredOptionalQuery.</p> +<dl> +<dt>required_query</dt> +<dd><p>Query must must match.</p> +</dd> +<dt>optional_query</dt> +<dd><p>Query which should match.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Required_Query">Get_Required_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* +<span class="prefix">lucy_</span><strong>ReqOptQuery_Get_Required_Query</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong> +); +</code></pre> +<p>Getter for the required Query.</p> +</dd> +<dt id="func_Set_Required_Query">Set_Required_Query</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>ReqOptQuery_Set_Required_Query</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>required_query</strong> +); +</code></pre> +<p>Setter for the required Query.</p> +</dd> +<dt id="func_Get_Optional_Query">Get_Optional_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* +<span class="prefix">lucy_</span><strong>ReqOptQuery_Get_Optional_Query</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong> +); +</code></pre> +<p>Getter for the optional Query.</p> +</dd> +<dt id="func_Set_Optional_Query">Set_Optional_Query</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>ReqOptQuery_Set_Optional_Query</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>optional_query</strong> +); +</code></pre> +<p>Setter for the optional Query.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ReqOptQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ReqOptQuery_To_String</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>ReqOptQuery_Equals</strong>( + <span class="prefix">lucy_</span>RequiredOptionalQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::RequiredOptionalQuery is a <a href="../../Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a> is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/Searcher.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/Searcher.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/Searcher.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/Searcher.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,186 @@ +Title: Lucy::Search::Searcher â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::Searcher</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SEARCHER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Searcher</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Searcher</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/Searcher.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::Searcher â Base class for searching collections of documents.</p> +<h3>Description</h3> +<p>Abstract base class for objects which search. Core subclasses include +<a href="../../Lucy/Search/IndexSearcher.html">IndexSearcher</a> and +<a href="../../Lucy/Search/PolySearcher.html">PolySearcher</a>.</p> +<h3>Functions</h3> +<dl> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Searcher* +<span class="prefix">lucy_</span><strong>Searcher_init</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong> +); +</code></pre> +<p>Abstract initializer.</p> +<dl> +<dt>schema</dt> +<dd><p>A Schema.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Searcher_Destroy</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +<dt id="func_Doc_Max">Doc_Max <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Searcher_Doc_Max</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong> +); +</code></pre> +<p>Return the maximum number of docs in the collection represented by the +Searcher, which is also the highest possible internal doc id. +Documents which have been marked as deleted but not yet purged are +included in this count.</p> +</dd> +<dt id="func_Doc_Freq">Doc_Freq <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>uint32_t +<span class="prefix">lucy_</span><strong>Searcher_Doc_Freq</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Return the number of documents which contain the term in the given +field.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>The term to look up.</p> +</dd> +</dl> +</dd> +<dt id="func_Glean_Query">Glean_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Glean_Query</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>query</strong> +); +</code></pre> +<p>If the supplied object is a Query, return it; if itâs a query string, +create a QueryParser and parse it to produce a query against all +indexed fields.</p> +</dd> +<dt id="func_Hits">Hits</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Hits.html">Hits</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Hits</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>query</strong>, + uint32_t <strong>offset</strong>, + uint32_t <strong>num_wanted</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/SortSpec.html">SortSpec</a> *<strong>sort_spec</strong> +); +</code></pre> +<p>Return a Hits object containing the top results.</p> +<dl> +<dt>query</dt> +<dd><p>Either a Query object or a query string.</p> +</dd> +<dt>offset</dt> +<dd><p>The number of most-relevant hits to discard, typically +used when âpagingâ through hits N at a time. Setting +<code>offset</code> to 20 and <code>num_wanted</code> to 10 retrieves +hits 21-30, assuming that 30 hits can be found.</p> +</dd> +<dt>num_wanted</dt> +<dd><p>The number of hits you would like to see after +<code>offset</code> is taken into account.</p> +</dd> +<dt>sort_spec</dt> +<dd><p>A <a href="../../Lucy/Search/SortSpec.html">SortSpec</a>, which will affect +how results are ranked and returned.</p> +</dd> +</dl> +</dd> +<dt id="func_Collect">Collect <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Searcher_Collect</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Collector.html">Collector</a> *<strong>collector</strong> +); +</code></pre> +<p>Iterate over hits, feeding them into a +<a href="../../Lucy/Search/Collector.html">Collector</a>.</p> +<dl> +<dt>query</dt> +<dd><p>A Query.</p> +</dd> +<dt>collector</dt> +<dd><p>A Collector.</p> +</dd> +</dl> +</dd> +<dt id="func_Fetch_Doc">Fetch_Doc <span class="comment">(abstract)</span></dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Document/HitDoc.html">HitDoc</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Fetch_Doc</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + int32_t <strong>doc_id</strong> +); +</code></pre> +<p>Retrieve a document. Throws an error if the doc id is out of range.</p> +<dl> +<dt>doc_id</dt> +<dd><p>A document id.</p> +</dd> +</dl> +</dd> +<dt id="func_Get_Schema">Get_Schema</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a>* +<span class="prefix">lucy_</span><strong>Searcher_Get_Schema</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong> +); +</code></pre> +<p>Accessor for the objectâs <code>schema</code> member.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::Searcher is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/SortRule.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/SortRule.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/SortRule.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/SortRule.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,115 @@ +Title: Lucy::Search::SortRule â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::SortRule</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SORTRULE</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>SortRule</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>SortRule</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/SortRule.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::SortRule â Element of a SortSpec.</p> +<h3>Description</h3> +<p>SortRules are the building blocks used to assemble +<a href="../../Lucy/Search/SortSpec.html">SortSpecs</a>; each SortRule defines a single +level of sorting. For example, sorting first by âcategoryâ then by score +requires a SortSpec with two SortRule elements.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortRule* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>SortRule_new</strong>( + int32_t <strong>type</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + bool <strong>reverse</strong> +); +</code></pre> +<p>Create a new SortRule.</p> +<dl> +<dt>type</dt> +<dd><p>Indicate whether to sort by score, field, etc. (The +default is to sort by a field.)</p> +</dd> +<dt>field</dt> +<dd><p>The name of a <code>sortable</code> field.</p> +</dd> +<dt>reverse</dt> +<dd><p>If true, reverse the order of the sort for this rule.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortRule* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>SortRule_init</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong>, + int32_t <strong>type</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + bool <strong>reverse</strong> +); +</code></pre> +<p>Initialize a SortRule. See <a href="../../Lucy/Search/SortRule.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>SortRule_Get_Field</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âfieldâ member.</p> +</dd> +<dt id="func_Get_Type">Get_Type</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>SortRule_Get_Type</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âtypeâ member.</p> +</dd> +<dt id="func_Get_Reverse">Get_Reverse</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>SortRule_Get_Reverse</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âreverseâ member.</p> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>SortRule_Destroy</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::SortRule is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/SortSpec.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/SortSpec.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/SortSpec.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/SortSpec.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,83 @@ +Title: Lucy::Search::SortSpec â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::SortSpec</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SORTSPEC</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>SortSpec</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>SortSpec</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/SortSpec.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::SortSpec â Specify a custom sort order for search results.</p> +<h3>Description</h3> +<p>By default, searches return results in order of relevance; SortSpec allows +you to indicate an alternate order via an array of +<a href="../../Lucy/Search/SortRule.html">SortRules</a>.</p> +<p>Fields you wish to sort against must be <code>sortable</code>.</p> +<p>For a stable sort (important when paging through results), add a +sort-by-doc rule as the last SortRule.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortSpec* +<span class="prefix">lucy_</span><strong>SortSpec_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>rules</strong> +); +</code></pre> +<p>Create a new SortSpec.</p> +<dl> +<dt>rules</dt> +<dd><p>An array of SortRules.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortSpec* +<span class="prefix">lucy_</span><strong>SortSpec_init</strong>( + <span class="prefix">lucy_</span>SortSpec *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>rules</strong> +); +</code></pre> +<p>Initialize a SortSpec.</p> +<dl> +<dt>rules</dt> +<dd><p>An array of SortRules.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>SortSpec_Destroy</strong>( + <span class="prefix">lucy_</span>SortSpec *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::SortSpec is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/Span.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/Span.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/Span.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/Span.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,171 @@ +Title: Lucy::Search::Span â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::Span</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SPAN</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Span</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Span</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/Span.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::Span â An offset, a length, and a weight.</p> +<h3>Description</h3> +<p>Span objects store information about a span across an array of⦠+something. The unit is context-dependent.</p> +<p>Text is one possibility, in which case offset and length might be measured +in Unicode code points. However, the Span could also refer to a span +within an array of tokens, for example â in which case the start and +offset might be measured in token positions.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Span* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Span_new</strong>( + int32_t <strong>offset</strong>, + int32_t <strong>length</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Create a new Span.</p> +<dl> +<dt>offset</dt> +<dd><p>Integer offset, unit is context-dependent.</p> +</dd> +<dt>length</dt> +<dd><p>Integer length, unit is context-dependent.</p> +</dd> +<dt>weight</dt> +<dd><p>A floating point weight.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Span* +<span class="prefix">lucy_</span><strong>Span_init</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>offset</strong>, + int32_t <strong>length</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Initialize a Span. See <a href="../../Lucy/Search/Span.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Offset">Get_Offset</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Get_Offset</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>offset</code> attribute.</p> +</dd> +<dt id="func_Set_Offset">Set_Offset</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Offset</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>offset</strong> +); +</code></pre> +<p>Setter for <code>offset</code> attribute.</p> +</dd> +<dt id="func_Get_Length">Get_Length</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Get_Length</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>length</code> attribute.</p> +</dd> +<dt id="func_Set_Length">Set_Length</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Length</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>length</strong> +); +</code></pre> +<p>Setter for <code>length</code> attribute.</p> +</dd> +<dt id="func_Get_Weight">Get_Weight</dt> +<dd> +<pre><code>float +<span class="prefix">lucy_</span><strong>Span_Get_Weight</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>weight</code> attribute.</p> +</dd> +<dt id="func_Set_Weight">Set_Weight</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Weight</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Setter for <code>weight</code> attribute.</p> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Span_Equals</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_Compare_To">Compare_To</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Compare_To</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether one object is less than, equal to, or greater than +another.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +<p><strong>Returns:</strong> 0 if the objects are equal, a negative number if +<code>self</code> is less than <code>other</code>, and a positive +number if <code>self</code> is greater than <code>other</code>.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::Span is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Search/TermQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Search/TermQuery.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Search/TermQuery.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Search/TermQuery.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,173 @@ +Title: Lucy::Search::TermQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::TermQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>TERMQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>TermQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>TermQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/TermQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::TermQuery â Query which matches individual terms.</p> +<h3>Description</h3> +<p>TermQuery is a subclass of <a href="../../Lucy/Search/Query.html">Query</a> for matching +individual terms in a specific field.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>TermQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Create a new TermQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>Term text.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>TermQuery* +<span class="prefix">lucy_</span><strong>TermQuery_init</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Initialize a TermQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>Term text.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>TermQuery_Get_Field</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs <code>field</code> member.</p> +</dd> +<dt id="func_Get_Term">Get_Term</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* +<span class="prefix">lucy_</span><strong>TermQuery_Get_Term</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs <code>term</code> member.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_To_String</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Dump</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Load</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>TermQuery_Equals</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>TermQuery_Destroy</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::TermQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext?rev=1737682&view=auto ============================================================================== --- lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext (added) +++ lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext Mon Apr 4 12:55:10 2016 @@ -0,0 +1,146 @@ +Title: Lucy::Simple â C API Documentation + +<div class="c-api"> +<h2>Lucy::Simple</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SIMPLE</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Simple</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Simple</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Simple.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Simple â Basic search engine.</p> +<h3>Description</h3> +<p>Lucy::Simple is a stripped-down interface for the Apache Lucy search +engine library.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Simple* +<span class="prefix">lucy_</span><strong>Simple_new</strong>( + <span class="prefix">cfish_</span><a href="../Clownfish/Obj.html">Obj</a> *<strong>path</strong>, + <span class="prefix">cfish_</span><a href="../Clownfish/String.html">String</a> *<strong>language</strong> +); +</code></pre> +<p>Create a Lucy::Simple object, which can be used for both indexing and +searching. Both parameters <code>path</code> and <code>language</code> are required.</p> +<dl> +<dt>path</dt> +<dd><p>Where the index directory should be located. If no index +is found at the specified location, one will be created.</p> +</dd> +<dt>language</dt> +<dd><p>The language of the documents in your collection, +indicated by a two-letter ISO code. 12 languages are supported:</p> +<pre><code>|-----------------------| +| Language | ISO code | +|-----------------------| +| Danish | da | +| Dutch | nl | +| English | en | +| Finnish | fi | +| French | fr | +| German | de | +| Italian | it | +| Norwegian | no | +| Portuguese | pt | +| Spanish | es | +| Swedish | sv | +| Russian | ru | +|-----------------------| +</code></pre> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Simple* +<span class="prefix">lucy_</span><strong>Simple_init</strong>( + <span class="prefix">lucy_</span>Simple *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../Clownfish/Obj.html">Obj</a> *<strong>path</strong>, + <span class="prefix">cfish_</span><a href="../Clownfish/String.html">String</a> *<strong>language</strong> +); +</code></pre> +<p>Initialize a Lucy::Simple object.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Add_Doc">Add_Doc</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Simple_Add_Doc</strong>( + <span class="prefix">lucy_</span>Simple *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../Lucy/Document/Doc.html">Doc</a> *<strong>doc</strong> +); +</code></pre> +<p>Add a document to the index.</p> +</dd> +<dt id="func_Search">Search</dt> +<dd> +<pre><code>uint32_t +<span class="prefix">lucy_</span><strong>Simple_Search</strong>( + <span class="prefix">lucy_</span>Simple *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../Clownfish/String.html">String</a> *<strong>query</strong>, + uint32_t <strong>offset</strong>, + uint32_t <strong>num_wanted</strong> +); +</code></pre> +<p>Search the index. Returns the total number of documents which match +the query. (This number is unlikely to match <code>num_wanted</code>.)</p> +<dl> +<dt>query</dt> +<dd><p>A search query string.</p> +</dd> +<dt>offset</dt> +<dd><p>The number of most-relevant hits to discard, typically +used when âpagingâ through hits N at a time. Setting offset to 20 and +num_wanted to 10 retrieves hits 21-30, assuming that 30 hits can be +found.</p> +</dd> +<dt>num_wanted</dt> +<dd><p>The number of hits you would like to see after +<code>offset</code> is taken into account.</p> +</dd> +</dl> +</dd> +<dt id="func_Next">Next</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../Lucy/Document/HitDoc.html">HitDoc</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Simple_Next</strong>( + <span class="prefix">lucy_</span>Simple *<strong>self</strong> +); +</code></pre> +<p>Return the next hit, or NULL when the iterator is exhausted.</p> +</dd> +<dt id="func_Destroy">Destroy</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Simple_Destroy</strong>( + <span class="prefix">lucy_</span>Simple *<strong>self</strong> +); +</code></pre> +<p>Generic destructor. Frees the struct itself but not any complex +member elements.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Simple is a <a href="../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div>