Documentation Source Text

Check-in [27ba2d2d59]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update fts5 documentation to reflect new column filter capability.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 27ba2d2d592d6710a98aa45752a42f977929b0045bb24cbde1ff71476c12988b
User & Date: dan 2017-04-12 20:00:50.669
Context
2017-04-12
20:02
Attempt to clarify the operation of the page_size pragma. (check-in: 6d2df6128e user: drh tags: trunk)
20:00
Update fts5 documentation to reflect new column filter capability. (check-in: 27ba2d2d59 user: dan tags: trunk)
2017-04-11
23:14
Fix a typo on the compile.html page. (check-in: 5c613c450a user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/fts5.in.
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<codeblock>
&lt;phrase&gt;    := string &#91;*]
&lt;phrase&gt;    := &lt;phrase&gt; + &lt;phrase&gt;
&lt;neargroup&gt; := NEAR ( &lt;phrase&gt; &lt;phrase&gt; ... &#91;, N] )
&lt;query&gt;     := &#91; &#91;-] &lt;colspec&gt; :] &lt;phrase&gt;
&lt;query&gt;     := &#91; &#91;-] &lt;colspec&gt; :] &lt;neargroup&gt;
&lt;query&gt;     := ( &lt;query&gt; )
&lt;query&gt;     := &lt;query&gt; AND &lt;query&gt;
&lt;query&gt;     := &lt;query&gt; OR &lt;query&gt;
&lt;query&gt;     := &lt;query&gt; NOT &lt;query&gt;
&lt;colspec&gt;   := colname
&lt;colspec&gt;   := { colname1 colname2 ... }
</codeblock>








|







170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

<codeblock>
&lt;phrase&gt;    := string &#91;*]
&lt;phrase&gt;    := &lt;phrase&gt; + &lt;phrase&gt;
&lt;neargroup&gt; := NEAR ( &lt;phrase&gt; &lt;phrase&gt; ... &#91;, N] )
&lt;query&gt;     := &#91; &#91;-] &lt;colspec&gt; :] &lt;phrase&gt;
&lt;query&gt;     := &#91; &#91;-] &lt;colspec&gt; :] &lt;neargroup&gt;
&lt;query&gt;     := &#91; &#91;-] &lt;colspec&gt; :] ( &lt;query&gt; )
&lt;query&gt;     := &lt;query&gt; AND &lt;query&gt;
&lt;query&gt;     := &lt;query&gt; OR &lt;query&gt;
&lt;query&gt;     := &lt;query&gt; NOT &lt;query&gt;
&lt;colspec&gt;   := colname
&lt;colspec&gt;   := { colname1 colname2 ... }
</codeblock>

319
320
321
322
323
324
325













326
327
328
329
330
331
332
  <i>-- Search for matches in all columns except "colname"</i>
  ... MATCH '- colname : NEAR("one two" "three four", 10)'

  <i>-- Search for matches in all columns except "col1", "col2" and "col3"</i>
  ... MATCH '- {col2 col1 col3} : one + two + three'
</codeblock>














<p>
Phrases and NEAR groups may be arranged into expressions using <b>boolean
operators</b>. In order of precedence, from highest (tightest grouping) to
lowest (loosest grouping), the operators are:

<table striped=1>
  <tr><th>Operator <th>Function







>
>
>
>
>
>
>
>
>
>
>
>
>







319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
  <i>-- Search for matches in all columns except "colname"</i>
  ... MATCH '- colname : NEAR("one two" "three four", 10)'

  <i>-- Search for matches in all columns except "col1", "col2" and "col3"</i>
  ... MATCH '- {col2 col1 col3} : one + two + three'
</codeblock>

<p>
Column filter specifications may also be applied to arbitrary expressions
enclosed in parenthesis. In this case the column filter applies to all 
phrases within the expression. Nested column filter operations may only 
further restrict the subset of columns matched, they can not be used to 
re-enable filtered columns. For example:

<codeblock>
  <i>-- The following are equivalent:</i>
  ... MATCH '{a b} : ( {b c} : "hello" AND "world" )'
  ... MATCH '(b : "hello") AND ({a b} : "world")'
</codeblock>

<p>
Phrases and NEAR groups may be arranged into expressions using <b>boolean
operators</b>. In order of precedence, from highest (tightest grouping) to
lowest (loosest grouping), the operators are:

<table striped=1>
  <tr><th>Operator <th>Function