FTS doesn't index paths correctly
Bug #860362 reported by
Michal Hruby
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Extensions |
Fix Released
|
High
|
Michal Hruby | ||
zeitgeist-extensions (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
There's a bug in scheme branching in fts (~line 610) which cause file:// uris to truncate and index the same way as http and other uris.
Related branches
lp:~mhr3/zeitgeist-extensions/scheme-detection
- Mikkel Kamstrup Erlandsen: Approve
-
Diff: 85 lines (+17/-22)1 file modifiedfts/fts.py (+17/-22)
Changed in zeitgeist-extensions: | |
assignee: | nobody → Michal Hruby (mhr3) |
Changed in zeitgeist-extensions (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in zeitgeist-extensions: | |
milestone: | none → fts-0.0.13 |
status: | Triaged → Fix Released |
To post a comment you must log in.
For reference this is the diff. I am not gonna apply it as is, as it'll require a reindex in order to take effect:
=== modified file 'fts/fts.py' _tokenizer. index_text( name, 5) _tokenizer. index_text( name, 5, "N") _tokenizer. index_text( name, weight)
--- fts/fts.py 2011-09-07 08:42:40 +0000
+++ fts/fts.py 2011-09-27 08:15:08 +0000
@@ -607,7 +607,7 @@
# usually web URIs, are indexed in another way because there may
# be domain name etc. in there we want to rank differently
scheme, host, path = self._split_uri (url_unescape (uri))
- if scheme == "file://" or not scheme:
+ if scheme == "file" or not scheme:
path, name = os.path.split(path)
self.
self.
@@ -619,7 +619,7 @@
path, name = os.path.split(path)
self.
- elif scheme == "mailto:": _tokenizer. index_text( name, 6)
+ elif scheme == "mailto":
tokens = host.split("@")
name = tokens[0]
self.