summaryrefslogtreecommitdiff
path: root/sphinx/websupport
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2016-12-16 19:44:27 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2016-12-16 19:45:26 +0900
commitcf795894b9290c5ab2035ae21535f0a7f4b7107a (patch)
tree57cc9c7fea74fbd6df03b10d421275e4b328b8dd /sphinx/websupport
parentaa49e31b64453cfbd5a34a126fbc215bfce59c84 (diff)
downloadsphinx-git-cf795894b9290c5ab2035ae21535f0a7f4b7107a.tar.gz
Fix #3246: xapian search adapter crashes
Diffstat (limited to 'sphinx/websupport')
-rw-r--r--sphinx/websupport/search/xapiansearch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/websupport/search/xapiansearch.py b/sphinx/websupport/search/xapiansearch.py
index 1e43dcbe9..aa7cff86a 100644
--- a/sphinx/websupport/search/xapiansearch.py
+++ b/sphinx/websupport/search/xapiansearch.py
@@ -39,16 +39,16 @@ class XapianSearch(BaseSearch):
# Ensure the db lock is removed.
del self.database
- def add_document(self, path, title, text):
+ def add_document(self, pagename, filename, title, text):
self.database.begin_transaction()
# sphinx_page_path is used to easily retrieve documents by path.
- sphinx_page_path = '"sphinxpagepath%s"' % path.replace('/', '_')
+ sphinx_page_path = '"sphinxpagepath%s"' % pagename.replace('/', '_')
# Delete the old document if it exists.
self.database.delete_document(sphinx_page_path)
doc = xapian.Document()
doc.set_data(text)
- doc.add_value(self.DOC_PATH, path)
+ doc.add_value(self.DOC_PATH, pagename)
doc.add_value(self.DOC_TITLE, title)
self.indexer.set_document(doc)
self.indexer.index_text(text)