Documentation Source Text

Check-in [23989471bd]
Login

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

Overview
Comment:Add a couple of details to fts5.in.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 23989471bd8f3f7977e146cd0b5dc2691fcd106f
User & Date: dan 2015-03-05 21:00:19.026
Context
2015-03-06
19:29
Further enhancements to fts5.in. (check-in: 984c3483df user: dan tags: trunk)
2015-03-05
21:00
Add a couple of details to fts5.in. (check-in: 23989471bd user: dan tags: trunk)
15:35
Fix the documentation of PRAGMA index_info to omit the three extra files that were reverted. Improve the documentation of PRAGMA index_list to detail the output fields. (check-in: 8b3cf7e669 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/fts5.in.
767
768
769
770
771
772
773
774









775
776
777
778
779
780
781
  INSERT INTO ft(ft, rowid, a, b, c) VALUES('delete', 14, $a, $b, $c);
</codeblock>

<p> If the values "inserted" into the text columns as part of a 'delete'
command are not the same as those currently stored within the table, the
results may be unpredictable.

<p><i style=color:red>todo: explain why</i>










<h2 tags="FTS5 delete-all command">The 'delete-all' Command</h2>

<p> This command is only available with [FTS5 external content tables |
external content] and [FTS5 contentless tables | contentless] tables. It
deletes all entries from the full-text index.








|
>
>
>
>
>
>
>
>
>







767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
  INSERT INTO ft(ft, rowid, a, b, c) VALUES('delete', 14, $a, $b, $c);
</codeblock>

<p> If the values "inserted" into the text columns as part of a 'delete'
command are not the same as those currently stored within the table, the
results may be unpredictable.

<p> The reason for this is easy to understand: When a document is inserted
into the FTS5 table, an entry is added to the full-text index to record the
position of each token within the new document. When a document is removed,
the original data is required in order to determine the set of entries that
need to be removed from the full-text index. So if the data supplied to FTS5
when a row is deleted using this command is different from that used to
determine the set of token instances when it was inserted, some full-text 
index entries may not be correctly deleted, or FTS5 may try to remove index 
entries that do not exist. This can leave the full-text index in an
unpredictable state, making future query results unreliable.

<h2 tags="FTS5 delete-all command">The 'delete-all' Command</h2>

<p> This command is only available with [FTS5 external content tables |
external content] and [FTS5 contentless tables | contentless] tables. It
deletes all entries from the full-text index.

860
861
862
863
864
865
866
867
868
869
870
871
872
873
874

<ul>
  <li> Adding new auxiliary functions implemented in C, and
  <li> Adding new tokenizers, also implemented in C.
</ul>

<p> The built-in tokenizers and auxiliary functions described in this
documented are all implemented using the publicly available API described
below.

<p> Before a new auxiliary function or tokenizer implementation may be 
registered with FTS5, an application must obtain a pointer to the "fts5_api"
structure. There is one fts5_api structure for each database connection with
which the FTS5 extension is registered. To obtain the pointer, the application
invokes the SQL user-defined function fts5(), which returns a blob value







|







869
870
871
872
873
874
875
876
877
878
879
880
881
882
883

<ul>
  <li> Adding new auxiliary functions implemented in C, and
  <li> Adding new tokenizers, also implemented in C.
</ul>

<p> The built-in tokenizers and auxiliary functions described in this
document are all implemented using the publicly available API described
below.

<p> Before a new auxiliary function or tokenizer implementation may be 
registered with FTS5, an application must obtain a pointer to the "fts5_api"
structure. There is one fts5_api structure for each database connection with
which the FTS5 extension is registered. To obtain the pointer, the application
invokes the SQL user-defined function fts5(), which returns a blob value