mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
table.search(quote=True) parameter, refs #296
This commit is contained in:
parent
f0fd19267f
commit
8ae77a6961
3 changed files with 54 additions and 11 deletions
|
|
@ -1843,8 +1843,15 @@ The ``.has_counts_triggers`` property shows if a table has been configured with
|
|||
|
||||
.. _python_api_fts:
|
||||
|
||||
Enabling full-text search
|
||||
=========================
|
||||
Full-text search
|
||||
================
|
||||
|
||||
SQLite includes bundled extensions that implement `powerful full-text search <https://www.sqlite.org/fts5.html>`__.
|
||||
|
||||
.. _python_api_fts_enable:
|
||||
|
||||
Enabling full-text search for a table
|
||||
-------------------------------------
|
||||
|
||||
You can enable full-text search on a table using ``.enable_fts(columns)``:
|
||||
|
||||
|
|
@ -1947,6 +1954,9 @@ The ``.search()`` method also accepts the following optional parameters:
|
|||
``offset`` integer
|
||||
Offset to use along side the limit parameter.
|
||||
|
||||
``quote`` bool
|
||||
Apply :ref:`FTS quoting rules <python_api_quote_fts>` to the search query, disabling advanced query syntax in a way that avoids surprising errors.
|
||||
|
||||
To return just the title and published columns for three matches for ``"dog"`` ordered by ``published`` with the most recent first, use the following:
|
||||
|
||||
.. code-block:: python
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue