Documentation Source Text

Check-in [a44bb18833]
Login

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

Overview
Comment:Fix an error regarding operator precedence in fts5.html.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a44bb1883372fd88bbbb054e7ca11d88e9c6b524
User & Date: dan 2016-01-06 16:09:06
Context
2016-01-12
13:44
Fix typos in the TCL interface documentation. check-in: 217ea4895f user: drh tags: branch-3.10
2016-01-11
13:00
Begin entering 3.11.0 changes. check-in: 166fc2da3a user: drh tags: trunk
2016-01-06
16:09
Fix an error regarding operator precedence in fts5.html. check-in: a44bb18833 user: dan tags: trunk
12:23
Update download.in to look for products with version numbers starting with "31" instead of "30". check-in: 55ba3b7506 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/fts5.in.

310
311
312
313
314
315
316
317
318
319
320
321




322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337

  ... MATCH '{col1 col2} : NEAR("one two" "three four", 10)'
  ... 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 to lowest, the operators 
are:

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




  <tr><td><code>&lt;query1&gt; AND &lt;query2&gt;</code> 
      <td>Matches if both query1 and query2 match.

  <tr><td><code>&lt;query1&gt; OR &lt;query2&gt;</code> 
      <td>Matches if either query1 or query2 match.

  <tr><td><code>&lt;query1&gt; NOT &lt;query2&gt;</code> 
      <td>Matches if query1 matches and query2 does not match.

</table>

<p>
Parenthesis may be used to group expressions in order to modify operator
precedence in the usual ways. For example:

<codeblock>







|
|



>
>
>
>






<
<
<







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331



332
333
334
335
336
337
338

  ... MATCH '{col1 col2} : NEAR("one two" "three four", 10)'
  ... 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

  <tr><td><code>&lt;query1&gt; NOT &lt;query2&gt;</code> 
      <td>Matches if query1 matches and query2 does not match.

  <tr><td><code>&lt;query1&gt; AND &lt;query2&gt;</code> 
      <td>Matches if both query1 and query2 match.

  <tr><td><code>&lt;query1&gt; OR &lt;query2&gt;</code> 
      <td>Matches if either query1 or query2 match.




</table>

<p>
Parenthesis may be used to group expressions in order to modify operator
precedence in the usual ways. For example:

<codeblock>