comparison doc/upgrading.txt @ 6604:0d99ae7c8de6

Allow Roundup to use PostgreSQL database native full text search back_postgreql.py - schema version changes for schema version 7. configuration.py - added indexer_language checks for postgresql. Hardcoded list for now. Docs admin_guide and upgrading Tests. This also restructures the version upgrade tests for the rdbms backends. They can run all of them now as the proper cascade is developed to roll back changes to version 6.
author John Rouillard <rouilj@ieee.org>
date Thu, 27 Jan 2022 19:48:48 -0500
parents 39189dd94f2c
children 2eec7a500333
comparison
equal deleted inserted replaced
6603:57dc15ad648d 6604:0d99ae7c8de6
92 want to merge the search form and footer into your template. 92 want to merge the search form and footer into your template.
93 93
94 Enhanced full-text search (optional) 94 Enhanced full-text search (optional)
95 ------------------------------------ 95 ------------------------------------
96 96
97 SQLite's `FTS5 full-text search engine`_ is available. It should work 97 SQLite's `FTS5 full-text search engine`_ is available as is
98 with any recent sqlite3 installation. Any full text search field will 98 `PostgreSQL's full text search`_. Both require a schema upgrade so you
99 allow searching using the MATCH query format described at: 99 should run::
100 https://www.sqlite.org/fts5.html#full_text_query_syntax. A list of 100
101 words behaves almost the same as the default text search 101 roundup-admin -i tracker_home migrate
102
103 to create FTS specific tables before restarting the roundup-web or
104 email interfaces.
105
106 SQLite 3.9.0+ or PostgreSQL 11.0+ are required to use this feature.
107 When using SQLite, all full text search fields will allow searching
108 using the MATCH query format described at:
109 https://www.sqlite.org/fts5.html#full_text_query_syntax. When using
110 PostgreSQL either the websearch_to_tsquery or to_tsquery formats
111 described on
112 https://www.postgresql.org/docs/14/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES
113 can be used. The default is websearch. Prefixing the search with
114 ``ts:`` enables tsquery mode.
115
116 A list of words behaves almost the same as the default text search
102 (`native`). So the search string `fts search` will find all issues 117 (`native`). So the search string `fts search` will find all issues
103 that have both of those words (an AND search) in a text-field (like 118 that have both of those words (an AND search) in a text-field (like
104 title) or in a message (or file) attached to the issue. 119 title) or in a message (or file) attached to the issue.
105 120
106 One thing to note is that the fts search does not ignore words longer 121 One thing to note is that native-fts searches do not ignore words
107 than 25 characters or less than 2 characters. Also it does not filter 122 longer than 25 characters or less than 2 characters. Also SQLite does
108 out common works (i.e. there is no stoplist). So words like "and", 123 not filter out common works (i.e. there is no stopword list). So words
109 "or", "then", "with" ... are included in the FTS5 search. The native 124 like "and", "or", "then", "with" ... are included in the FTS5 search.
110 search applies both filters. 125
111 126 You must explicitly enable this search mechanism by changing the
112 Using SQLite FTS requires a schema change so you should run 127 ``indexer`` setting in ``config.ini`` to ``native-fts``. Native-fts is
113 ``roundup-admin -i tracker_home migrate`` as the FTS specific tables 128 never chosen by default like xapian or whoosh. This prevents the
114 need to be created. 129 existing native indexing from being discarded if ``indexer`` is not
115 130 set.
116 Then you must explicitly enable it by changing the ``indexer`` setting
117 in ``config.ini`` to ``native-fts``. Native-fts is never chosen by default
118 like xapian or whoosh. This prevents the existing native indexing from
119 being discarded if ``indexer`` is not set.
120 131
121 Next re-index your data with ``roundup-admin -i tracker_home 132 Next re-index your data with ``roundup-admin -i tracker_home
122 reindex``. This can take a while depending on the size of the tracker. 133 reindex``. This can take a while depending on the size of the tracker.
123 134
124 You may want to update your ``config.ini`` by following the directions 135 You may want to update your ``config.ini`` by following the directions
125 above to get the latest documentation. 136 above to get the latest documentation.
126 137
127 If you are happy with the fts indexing, you can save some space by 138 See the `administration guide notes on native-fts`_ for further details.
128 removing the data from the native text indexing tables. This requires
129 using the ``sqlite3`` command to delete the rows in the ``__textids`` and
130 ``__words`` tables. You can do this with the following sqlite3
131 commands::
132
133 delete from __words;
134 delete from __textids;
135 139
136 Adding error reporting templates (optional) 140 Adding error reporting templates (optional)
137 ------------------------------------------- 141 -------------------------------------------
138 142
139 Currently some internal errors result in a bare html page with an 143 Currently some internal errors result in a bare html page with an
3360 .. _`customisation documentation`: customizing.html 3364 .. _`customisation documentation`: customizing.html
3361 .. _`security documentation`: security.html 3365 .. _`security documentation`: security.html
3362 .. _`administration guide`: admin_guide.html 3366 .. _`administration guide`: admin_guide.html
3363 .. _`xmlrpc guide`: xmlrpc.html 3367 .. _`xmlrpc guide`: xmlrpc.html
3364 .. _FTS5 full-text search engine: https://www.sqlite.org/fts5.html 3368 .. _FTS5 full-text search engine: https://www.sqlite.org/fts5.html
3369 .. _PostgreSQL's full text search: https://www.postgresql.org/docs/current/textsearch.html
3370 .. _`administration guide notes on native-fts`: admin_guide.html#configuring-native-fts-full-text-search
3365 .. _Configuring Compression: admin_guide.html#configuring-compression 3371 .. _Configuring Compression: admin_guide.html#configuring-compression

Roundup Issue Tracker: http://roundup-tracker.org/