From ee5b5728bc145cc01a009c94f2ce3eb71812b71a Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Tue, 15 Sep 2026 12:31:55 -0700 Subject: [PATCH] Fix some broken links in docs Refs #2912 --- docs/facets.rst | 2 +- docs/full_text_search.rst | 32 +++++++++++--------------------- docs/introspection.rst | 2 +- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/docs/facets.rst b/docs/facets.rst index 55802a9d..6bb822e0 100644 --- a/docs/facets.rst +++ b/docs/facets.rst @@ -7,7 +7,7 @@ Datasette facets can be used to add a faceted browse interface to any database t With facets, tables are displayed along with a summary showing the most common values in specified columns. These values can be selected to further filter the table. -Here's `an example `__: +Here's `an example `__: .. image:: https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/non-retina/faceting-details.png :alt: Screenshot showing facets against a table of congressional legislators. Suggested facets include state_rank and start and end dates, and the displayed facets are state, party and type. Each facet lists values along with a count of rows for each value. diff --git a/docs/full_text_search.rst b/docs/full_text_search.rst index 2769d004..8b627cdc 100644 --- a/docs/full_text_search.rst +++ b/docs/full_text_search.rst @@ -19,7 +19,7 @@ The table page and table view API Table views that support full-text search can be queried using the ``?_search=TERMS`` query string parameter. This will run the search against content from all of the columns that have been included in the index. -Try this example: `fara.datasettes.com/fara/FARA_All_ShortForms?_search=manafort `__ +Try `searching Datasette ecosystem repositories for "csv" `__ to find tools for working with CSV files. SQLite full-text search supports wildcards. This means you can easily implement prefix auto-complete by including an asterisk at the end of the search term - for example:: @@ -120,41 +120,31 @@ Searches using custom SQL You can include full-text search results in custom SQL queries. The general pattern with SQLite search is to run the search as a sub-select that returns rowid values, then include those rowids in another part of the query. -You can see the syntax for a basic search by running that search on a table page and then clicking "View and edit SQL" to see the underlying SQL. For example, consider this search for `manafort is the US FARA database `_:: +You can see the syntax for a basic search by running that search on a table page and then clicking "View and edit SQL" to see the underlying SQL. For example, consider this search for `repositories mentioning "csv" `_:: - /fara/FARA_All_ShortForms?_search=manafort + /content/repos?_search=csv -If you click `View and edit SQL `_ you'll see that the underlying SQL looks like this: +The generated SQL selects all columns in the table. This simplified version selects just the repository ID, full name and description, using the same full-text search condition. `Run this query `_ with ``search`` set to ``csv``: .. code-block:: sql select - rowid, - Short_Form_Termination_Date, - Short_Form_Date, - Short_Form_Last_Name, - Short_Form_First_Name, - Registration_Number, - Registration_Date, - Registrant_Name, - Address_1, - Address_2, - City, - State, - Zip + id, + full_name, + description from - FARA_All_ShortForms + repos where rowid in ( select rowid from - FARA_All_ShortForms_fts + repos_fts where - FARA_All_ShortForms_fts match escape_fts(:search) + repos_fts match escape_fts(:search) ) order by - rowid + id limit 101 diff --git a/docs/introspection.rst b/docs/introspection.rst index 5dd8e27b..132f9edf 100644 --- a/docs/introspection.rst +++ b/docs/introspection.rst @@ -76,7 +76,7 @@ Shows the version of Datasette, Python and SQLite. `Versions example `_: +Shows a list of currently installed plugins and their versions. `Plugins example `_: .. code-block:: json