Mercurial > p > roundup > code
annotate doc/roundup-server.ini.example @ 6915:9ff091537f43
postgresql native-fts; more indexer tests
1) Make postgresql native-fts actually work.
2) Add simple stopword filtering to sqlite native-fts indexer.
3) Add more tests for indexer_common get_indexer
Details:
1) roundup/backends/indexer_postgresql_fts.py:
ignore ValueError raised if we try to index a string with a null
character in it. This could happen due to an incorrect text/ mime
type on a file that has nulls in it.
Replace ValueError raised by postgresql with customized
IndexerQueryError if a search string has a null in it.
roundup/backends/rdbms_common.py:
Make postgresql native-fts work. When specified it was using using
whatever was returned from get_indexer(). However loading the
native-fts indexer backend failed because there was no connection to
the postgresql database when this call was made.
Simple solution, move the call after the open_connection call in
Database::__init__().
However the open_connection call creates the schema for the
database if it is not there. The schema builds tables for
indexer=native type indexing. As part of the build it looks at the
indexer to see the min/max size of the indexed tokens. No indexer
define, we get a crash.
So it's a a chicken/egg issue. I solved it by setting the indexer
to the Indexer from indexer_common which has the min/max token size
info. I also added a no-op save_indexer to this Indexer class. I
claim save_indexer() isn't needed as a commit() on the db does all
the saving required. Then after open_connection is called, I call
get_indexer to retrieve the correct indexer and
indexer_postgresql_fts woks since the conn connection property is
defined.
roundup/backends/indexer_common.py:
add save_index() method for indexer. It does nothing but is needed
in rdbms backends during schema initialization.
2) roundup/backends/indexer_sqlite_fts.py:
when this indexer is used, the indexer test in DBTest on the word
"the" fail. This is due to missing stopword filtering. Implement
basic stopword filtering for bare stopwords (like 'the') to make the
test pass. Note: this indexer is not currently automatically run by
the CI suite, it was found during manual testing. However there is a
FIXME to extract the indexer tests from DBTest and run it using this
backend.
roundup/configuration.py, roundup/doc/admin_guide.txt:
update doc on stopword use for sqlite native-fts.
test/db_test_base.py:
DBTest::testStringBinary creates a file with nulls in it. It was
breaking postgresql with native-fts indexer. Changed test to assign
mime type application/octet-stream that prevents it from being
processed by any text search indexer.
add test to exclude indexer searching in specific props. This code
path was untested before.
test/test_indexer.py:
add test to call find with no words. Untested code path.
add test to index and find a string with a null \x00 byte. it was
tested inadvertently by testStringBinary but this makes it explicit
and moves it to indexer testing. (one version each for: generic,
postgresql and mysql)
Renamed Get_IndexerAutoSelectTest to Get_IndexerTest and renamed
autoselect tests to include autoselect. Added tests for an invalid
indexer and using native-fts with anydbm (unsupported combo) to make
sure the code does something useful if the validation in
configuration.py is broken.
test/test_liveserver.py:
add test to load an issue
add test using text search (fts) to find the issue
add tests to find issue using postgresql native-fts
test/test_postgresql.py, test/test_sqlite.py:
added explanation on how to setup integration test using native-fts.
added code to clean up test environment if native-fts test is run.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 05 Sep 2022 16:25:20 -0400 |
| parents | 96dc9f07340a |
| children | 09af33304790 |
| rev | line source |
|---|---|
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 ; This is a sample configuration file for roundup-server. See the |
|
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
2 ; admin_guide for information about its contents. |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
3 |
|
3880
2359d6304a4f
Allow template for tracker index page
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2632
diff
changeset
|
4 [main] |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
5 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
6 # Host name of the Roundup web server instance. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
7 # If left unconfigured (no 'host' setting) the default |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
8 # will be used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
9 # If empty, listen on all network interfaces. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
10 # If you want to explicitly listen on all |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
11 # network interfaces, the address 0.0.0.0 is a more |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
12 # explicit way to achieve this, the use of an empty |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
13 # string for this purpose is deprecated and will go away |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
14 # in a future release. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
15 # Default: localhost |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
16 host = localhost |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
17 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
18 # Port to listen on. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
19 # Default: 8080 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
20 port = 8017 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
21 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
22 # Path to favicon.ico image file. If unset, built-in favicon.ico is used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
23 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
24 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
25 # Default: favicon.ico |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
26 favicon = favicon.ico |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
27 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
28 # User ID as which the server will answer requests. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
29 # In order to use this option, the server must be run initially as root. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
30 # Availability: Unix. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
31 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
32 user = roundup |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
33 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
34 # Group ID as which the server will answer requests. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
35 # In order to use this option, the server must be run initially as root. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
36 # Availability: Unix. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
37 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
38 group = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
39 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
40 # don't fork (this overrides the pidfile mechanism)' |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
41 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
42 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
43 nodaemon = no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
44 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
45 # Log client machine names instead of IP addresses (much slower) |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
46 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
47 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
48 log_hostnames = no |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
49 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
50 # File to which the server records the process id of the daemon. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
51 # If this option is not set, the server will run in foreground |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
52 # |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
53 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
54 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
55 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
56 pidfile = |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
57 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
58 # Log file path. If unset, log to stderr. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
59 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
60 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
61 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
62 logfile = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
63 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
64 # Set processing of each request in separate subprocess. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
65 # Allowed values: debug, none, thread, fork. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
66 # Default: fork |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
67 multiprocess = fork |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
68 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
69 # Tracker index template. If unset, built-in will be used. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
70 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
71 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
72 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
73 template = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
74 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
75 # Enable SSL support (requires pyopenssl) |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
76 # Allowed values: yes, no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
77 # Default: no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
78 ssl = no |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
79 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
80 # PEM file used for SSL. A temporary self-signed certificate |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
81 # will be used if left blank. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
82 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
83 # to the directory containing this config file. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
84 # Default: |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
85 pem = |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
86 |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
87 # Roundup trackers to serve. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
88 # Each option in this section defines single Roundup tracker. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
89 # Option name identifies the tracker and will appear in the URL. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
90 # Option value is tracker home directory path. |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
91 # The path may be either absolute or relative |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
92 # to the directory containing this config file. |
|
3880
2359d6304a4f
Allow template for tracker index page
Justus Pendleton <jpend@users.sourceforge.net>
parents:
2632
diff
changeset
|
93 [trackers] |
|
2632
9c55f2bc5961
roundup-server now has a configuration file (-C option)
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
94 |
|
5102
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
95 demo = /trackers/demo |
|
96dc9f07340a
issue2161722: oudated docs
John Rouillard <rouilj@ieee.org>
parents:
3883
diff
changeset
|
96 sysadmin = /trackers/sysadmin |
