* make remove work correctly
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user