* make remove work correctly

This commit is contained in:
Eray Özkural
2006-05-24 21:55:10 +00:00
parent 3f6b859600
commit 486fd7e73b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ def add_doc(id, lang, docid, str, repo = None, txn = None):
ctx.invidx[id][lang].add_doc(docid, terms, repo=repo, txn=txn)
def remove_doc(id, lang, docid, str, repo = None, txn = None):
ctx.invidx[id][lang].remove_doc(docid, repo = repo, txn = txn)
terms = p.preprocess(lang, str)
ctx.invidx[id][lang].remove_doc(docid, terms, repo = repo, txn = txn)
def query_terms(id, lang, terms, repo = None, txn = None):
terms = map(lambda x: p.lower(lang, x), terms)
+1 -1
View File
@@ -39,7 +39,7 @@ class InvertedIndex(object):
return self.d.txn_proc(proc, txn)
def get_union_term(self, name, txn = None, repo = itembyrepodb.repos ):
"""get a union of all repository components packages, not just the first repo in order.
"""get a union of all repository terms, not just the first repo in order.
get only basic repo info from the first repo"""
name = shelve.LockedDBShelf.encodekey(name)
def proc(txn):