<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:fh="http://purl.org/syndication/history/1.0">
  <title>Posts tagged: fts Archive</title>
  <id>https://new.waylonwalker.com/tags/fts/archive/atom.xml</id>
  <updated>2023-08-20T19:32:39Z</updated>
  <subtitle>All posts with the tag &#34;fts&#34;</subtitle>
  <link href="https://new.waylonwalker.com/tags/fts/" rel="alternate" type="text/html"></link>
  <link href="https://new.waylonwalker.com/tags/fts/archive/atom.xml" rel="self" type="application/atom+xml"></link>
  <link href="https://new.waylonwalker.com/tags/fts/atom.xml" rel="current" type="application/atom+xml"></link>
  <author>
    <name>Waylon Walker</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <fh:complete></fh:complete>
  <entry>
    <title>sqlite_utils Python library - sqlite-utils</title>
    <id>https://new.waylonwalker.com/thought-94/</id>
    <updated>2023-08-20T19:32:39Z</updated>
    <published>2023-08-20T19:32:39Z</published>
    <link href="https://new.waylonwalker.com/thought-94/" rel="alternate" type="text/html"></link>
    <summary type="text">!https://sqlite-utils.datasette.io/en/stable/python-api.html#full-text-search</summary>
    <content type="html">&lt;div class=&#34;embed-card embed-card-external&#34;&gt;&#xA;  &lt;a class=&#34;embed-card-link  has-avatar has-avatar-before&#34; href=&#34;https://sqlite-utils.datasette.io/en/stable/python-api.html#full-text-search&#34; rel=&#34;noopener noreferrer&#34; target=&#34;_blank&#34; style=&#34;--favicon-url: url(&amp;#39;/assets/markata/link-avatars/sqlite-utils.datasette.io.ico&amp;#39;);&#34; data-favicon=&#34;/assets/markata/link-avatars/sqlite-utils.datasette.io.ico&#34;&gt;&#xA;    &lt;div class=&#34;embed-card-content&#34;&gt;&#xA;      &lt;div class=&#34;embed-card-title&#34;&gt;sqlite_utils Python library - sqlite-utils&lt;/div&gt;&#xA;      &lt;div class=&#34;embed-card-meta&#34;&gt;sqlite-utils.datasette.io&lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;sqlite-utils is primarily a cli tool for sqlite operations such as enabling full text search, and executing searches, but it also has a nice python api that is exposed and pretty straightforward to use.&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlite_utils&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Database&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;db&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Database&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;database.db&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;post&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;enable_fts&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;title&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;tags])&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;post&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;search&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;water&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This returns a generator object that you can iterate over the row objects with.&lt;/p&gt;&#xA;</content>
    <author>
      <name>Waylon Walker</name>
      <email>hello@waylonwalker.com</email>
      <uri>https://waylonwalker.com</uri>
    </author>
  </entry>
</feed>