Skip to content

Commit 6a67a16

Browse files
author
Richard Jones
committed
Update Xapian to use latest stemmer API
(since version 0.9.0 and now enforced in 1.0.0+)
1 parent eb91563 commit 6a67a16

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

CHANGES.txt

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Fixed:
3636
reindexing.
3737
- Turning off indexing for content properties of FileClass instance
3838
(e.g., "file" and "msg") now works for SQL backends.
39-
- Enabled over-riding of content-type in web interface (thanks
39+
- Enabled over-riding of content-type in web interface (thanks
4040
John Mitchell)
4141
- Validate user timezones to filter bad entries (sf bug 1738470)
4242
- Classic template allows searching for issues with no topic set
@@ -59,11 +59,13 @@ Fixed:
5959
- allow CSV export of queries on selected issues (sf bug 1783492)
6060
- remove blobfiles on destroy (sf bug 1654132)
6161
- handle postgres exceptions during session cleanup (sf bug 1703116)
62+
- update Xapian indexer to use current API
63+
6264

6365
2007-02-15 1.3.3
6466
Fixed:
6567
- If-Modified-Since handling was broken
66-
- Updated documentation for customising hard-coded searches in page.html
68+
- Updated documentation for customising hard-coded searches in page.html
6769
- Updated Windows installation docs (thanks Bo Berglund)
6870
- Handle rounding of seconds generating invalid date values
6971
- Handle 8-bit untranslateable messages from database properties
@@ -829,9 +831,9 @@ Fixed:
829831
- anonymous user can no longer edit or view itself (sf bug 828901).
830832
- corrected typo in installation.html (sf bug 822967).
831833
- clarified listTemplates docstring.
832-
- print a nicer error message when the address is already in use
834+
- print a nicer error message when the address is already in use
833835
(sf bug 798659).
834-
- remove empty lines before sending strings off to the csv parser
836+
- remove empty lines before sending strings off to the csv parser
835837
(sf bug 821364).
836838
- centralised conversion of user-input data to hyperdb values (sf bug
837839
802405, sf bug 817217, sf rfe 816994)
@@ -855,7 +857,7 @@ Cleanup:
855857
- tidied up forms in default stylesheet
856858
- force textareas to use monospace fonts, lessening surprise on the user
857859
- moved out parts of client.py to new modules:
858-
* actions.py - the xxxAction and xxxPermission functions refactored into
860+
* actions.py - the xxxAction and xxxPermission functions refactored into
859861
Action classes
860862
* exceptions.py - all exceptions
861863
* form_parser.py - parsePropsFromForm & extractFormList in a FormParser
@@ -1013,7 +1015,7 @@ Fixed:
10131015
- audit some user properties for valid values (roles, address) (sf bugs
10141016
742968 and 739653)
10151017
- fix HTML file detection (hence history xref linking) (sf bug 741478)
1016-
- session database caches it's type, rather than calling whichdb each time
1018+
- session database caches it's type, rather than calling whichdb each time
10171019
around.
10181020
- changed rdbms_common to fix sql backends for new Boolean types under Py2.3
10191021

@@ -1048,7 +1050,7 @@ Feature:
10481050
cc addresses, different from address and different nosy list property)
10491051
(thanks John Rouillard)
10501052
- applied patch for nicer history display (sf feature 638280)
1051-
- cleaning old unused sessions only once per hour, not on every cgi
1053+
- cleaning old unused sessions only once per hour, not on every cgi
10521054
request. It is greatly improves web interface performance, especially
10531055
on trackers under high load
10541056
- added mysql backend (see doc/mysql.txt for details)
@@ -1106,7 +1108,7 @@ Feature:
11061108

11071109
Fixed:
11081110
- applied unicode patch. All data is stored in utf-8. Incoming messages
1109-
converted from any encoding to utf-8, outgoing messages are encoded
1111+
converted from any encoding to utf-8, outgoing messages are encoded
11101112
according to rfc2822 (sf bug 568873)
11111113
- fixed layout issues with forms in sidebar
11121114
- fixed timelog example so it handles new issues (sf bug 678908)
@@ -1189,7 +1191,7 @@ Fixed:
11891191
- handle :add: better in cgi form parsing (sf bug 663235)
11901192
- handle all-whitespace multilink values in forms (sf bug 663855)
11911193
- fixed searching on date / interval fields (sf bug 658157)
1192-
- fixed form elements names in search form to allow grouping and sorting
1194+
- fixed form elements names in search form to allow grouping and sorting
11931195
on "creation" field
11941196
- display of saved queries is now performed correctly
11951197

@@ -1379,7 +1381,7 @@ Feature:
13791381
- daemonify roundup-server (fork, logfile, pidfile)
13801382
- modify cgitb to display PageTemplate errors better
13811383
- rename to "instance" to "tracker"
1382-
- have roundup.cgi pick up tracker config from the environment
1384+
- have roundup.cgi pick up tracker config from the environment
13831385
- revamped look and feel in web interface
13841386
- cleaned up stylesheet usage
13851387
- several bug fixes and documentation fixes
@@ -1413,7 +1415,7 @@ Feature:
14131415
done in the default templates.
14141416
- the regeneration of the indexes (if necessary) is done once the schema is
14151417
set up in the dbinit.
1416-
- new "reindex" command in roundup-admin used to force regeneration of the
1418+
- new "reindex" command in roundup-admin used to force regeneration of the
14171419
index
14181420
- added email display function - mangles email addrs so they're not so easily
14191421
scraped from the web
@@ -1491,7 +1493,7 @@ Fixed:
14911493
wants to ignore
14921494
- fixed the example addresses in the templates to use correct example domains
14931495
- cleaned out the template stylesheets, removing a bunch of junk that really
1494-
wasn't necessary (font specs, styles never used) and added a style for
1496+
wasn't necessary (font specs, styles never used) and added a style for
14951497
message content
14961498
- build htmlbase if tests are run using CVS checkout
14971499
- #565979 ] code error in hyperdb.Class.find
@@ -1504,7 +1506,7 @@ Fixed:
15041506
- #565992 ] if ISSUE_TRACKER_WEB doesn't have the trailing '/', add it
15051507
- use the rfc822 module to ensure that every (oddball) email address and
15061508
real-name is properly quoted
1507-
- #558867 ] ZRoundup redirect /instance requests to /instance/
1509+
- #558867 ] ZRoundup redirect /instance requests to /instance/
15081510
- #569415 ] {version}
15091511
- #569178 ] type error
15101512
was fixed as part of the general cleanup of reactors
@@ -1568,13 +1570,13 @@ Fixed:
15681570
2002-01-24 - 0.4.0
15691571
Feature:
15701572
- much nicer history display (actualy real handling of property types etc)
1571-
- journal entries for link and mutlilink properties can be switched on or
1573+
- journal entries for link and mutlilink properties can be switched on or
15721574
off
15731575
- properties in change note are now sorted
15741576
- you can now use the roundup-admin tool pack the database
15751577

15761578
Fixed:
1577-
- the mail gateway now responds with an error message when invalid values
1579+
- the mail gateway now responds with an error message when invalid values
15781580
for arguments are specified for link or mutlilink properties
15791581
- modified unit test to check nosy and assignedto when specified as arguments
15801582
- handle attachments with no name (eg tnef)
@@ -1681,7 +1683,7 @@ Fixed:
16811683
- added tests for mailgw
16821684

16831685

1684-
2001-11-23 - 0.3.0
1686+
2001-11-23 - 0.3.0
16851687
Feature:
16861688
- #467129 ] Lossage when username=e-mail-address
16871689
- #473123 ] Change message generation for author
@@ -1989,7 +1991,7 @@ Features:
19891991
- Added the "classic" template - a direct implementation of the Roundup
19901992
spec. Well, as close as we're going to get, anyway.
19911993
- Added an issue priority of support to "extended"
1992-
- Added command-line arg handling to roundup-server so it's more useful
1994+
- Added command-line arg handling to roundup-server so it's more useful
19931995
out-of-the-box.
19941996
- Added distutils-style installation of "lib" files.
19951997
- Added some unit tests.

roundup/backends/indexer_xapian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#$Id: indexer_xapian.py,v 1.5 2007-09-05 18:46:39 jpend Exp $
1+
#$Id: indexer_xapian.py,v 1.6 2007-10-25 07:02:42 richard Exp $
22
''' This implements the full-text indexer using the Xapian indexer.
33
'''
44
import re, os
@@ -113,7 +113,7 @@ def find(self, wordlist):
113113
stemmer = xapian.Stem("english")
114114
terms = []
115115
for term in [word.upper() for word in wordlist if 26 > len(word) > 2]:
116-
terms.append(stemmer.stem_word(term.upper()))
116+
terms.append(stemmer(term.upper()))
117117
query = xapian.Query(xapian.Query.OP_AND, terms)
118118

119119
enquire.set_query(query)

0 commit comments

Comments
 (0)