Python module: add method to retrieve the full snippets list

This commit is contained in:
Jean-Francois Dockes
2021-03-10 13:30:50 +01:00
parent 9b24501f57
commit f57530e2a6
5 changed files with 170 additions and 41 deletions
+20
View File
@@ -7307,6 +7307,26 @@ for doc in results:
also perform highlighting. See the highlight
method.</p>
</dd>
<dt><span class="term">Query.getsnippets(doc,
maxoccs = -1, ctxwords = -1, sortbypage=False,
methods = object)</span></dt>
<dd>
<p>Will return a list of extracts from the
result document by selecting text around the
match terms. Each entry in the result list is a
triple: page number, term, text. By default,
the most relevants snippets appear first in the
list. Set <code class=
"literal">sortbypage</code> to sort by page
number instead. If <code class=
"literal">methods</code> is set, the fragments
will be highlighted (see the highlight method).
If <code class="literal">maxoccs</code> is set,
it defines the maximum result list length.
<code class="literal">ctxwords</code> allows
adjusting the individual snippet context
size.</p>
</dd>
<dt><span class="term">Query.__iter__() and
Query.next()</span></dt>
<dd>