comparison roundup/configuration.py @ 6588:91ab3e0ffcd0

Summary: Add test cases for sqlite fts Add support for using the FTS5 full text query engine for sqlite. Also stubbed out some sections for adding postgresql FTS support as well. Added nee indexer type native-fts. It is not selected by default. The indexer=native is used if no indexer is set. This prevents an upgrade from seeming to wipe out the native index if upgraded and indexer=native is not explicitly set. Docs updated. Also changed section headers to sentence case for the current release notes. Indexing backend can control if the full text search phrase is broken into a list of words or passed intact. For backends with query languages (sqlite and can be enabled for whoosh and xapian) we do not want the phrase "tokenized" on whitespace. This also updates the rdbms database version to version 7 to add FTS table. I will be using the same version when I add postgresql. If somebody runs this version on postgresql, they will have to manually add the fts tables for postgresql if they want to use it. Added a new renderError method to client. This allows errors to be reported still using page.html rather than raw html. It also supports templates for any error code. If no template for the error code (e.g. 400) is found, the error in raw html with no page frame is shown. New IndexerQueryError exception to pass back message about query syntax errors.
author John Rouillard <rouilj@ieee.org>
date Sun, 23 Jan 2022 18:57:45 -0500
parents 770503bd211e
children 0d99ae7c8de6
comparison
equal deleted inserted replaced
6587:4f8fc55730e1 6588:91ab3e0ffcd0
424 424
425 425
426 class IndexerOption(Option): 426 class IndexerOption(Option):
427 """Valid options for indexer""" 427 """Valid options for indexer"""
428 428
429 allowed = ['', 'xapian', 'whoosh', 'native'] 429 allowed = ['', 'xapian', 'whoosh', 'native', 'native-fts']
430 class_description = "Allowed values: %s" % ', '.join("'%s'" % a 430 class_description = "Allowed values: %s" % ', '.join("'%s'" % a
431 for a in allowed) 431 for a in allowed)
432 432
433 def str2value(self, value): 433 def str2value(self, value):
434 _val = value.lower() 434 _val = value.lower()
873 "Offer registration confirmation by email or only through the web?"), 873 "Offer registration confirmation by email or only through the web?"),
874 (IndexerOption, "indexer", "", 874 (IndexerOption, "indexer", "",
875 "Force Roundup to use a particular text indexer.\n" 875 "Force Roundup to use a particular text indexer.\n"
876 "If no indexer is supplied, the first available indexer\n" 876 "If no indexer is supplied, the first available indexer\n"
877 "will be used in the following order:\n" 877 "will be used in the following order:\n"
878 "Possible values: xapian, whoosh, native (internal)."), 878 "Possible values: xapian, whoosh, native (internal), "
879 "native-fts.\nNote 'native-fts' will only be used if set."),
879 (Option, "indexer_language", "english", 880 (Option, "indexer_language", "english",
880 "Used to determine what language should be used by the\n" 881 "Used to determine what language should be used by the\n"
881 "indexer above. Currently only affects Xapian indexer. It\n" 882 "indexer above. Currently only affects Xapian indexer. It\n"
882 "sets the language for the stemmer.\n" 883 "sets the language for the stemmer.\n"
883 "Possible values: must be a valid language for the indexer,\n" 884 "Possible values: must be a valid language for the indexer,\n"
884 "see indexer documentation for details."), 885 "see indexer documentation for details."),
885 (WordListOption, "indexer_stopwords", "", 886 (WordListOption, "indexer_stopwords", "",
886 "Additional stop-words for the full-text indexer specific to\n" 887 "Additional stop-words for the full-text indexer specific to\n"
887 "your tracker. See the indexer source for the default list of\n" 888 "your tracker. See the indexer source for the default list of\n"
888 "stop-words (eg. A,AND,ARE,AS,AT,BE,BUT,BY, ...)"), 889 "stop-words (eg. A,AND,ARE,AS,AT,BE,BUT,BY, ...). This is\n"
890 "not used by the native-fts indexer."),
889 (OctalNumberOption, "umask", "0o002", 891 (OctalNumberOption, "umask", "0o002",
890 "Defines the file creation mode mask."), 892 "Defines the file creation mode mask."),
891 (IntegerNumberGeqZeroOption, 'csv_field_size', '131072', 893 (IntegerNumberGeqZeroOption, 'csv_field_size', '131072',
892 "Maximum size of a csv-field during import. Roundups export\n" 894 "Maximum size of a csv-field during import. Roundups export\n"
893 "format is a csv (comma separated values) variant. The csv\n" 895 "format is a csv (comma separated values) variant. The csv\n"

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