~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/search.py

  • Committer: Steve 'Ashcrow' Milner
  • Date: 2008-10-24 17:15:39 UTC
  • mto: This revision was merged to the branch mainline in revision 231.
  • Revision ID: stevem@gnulinux.net-20081024171539-ei8f8998i3yrtzp4
Added *.log to the ignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
19
#
20
20
import sets
21
 
import os
22
21
try:
23
22
    from bzrlib.plugins.search import errors
24
23
    from bzrlib.plugins.search import index as _mod_index
26
25
except ImportError:
27
26
    _mod_index = None
28
27
 
 
28
 
29
29
def search_revisions(branch, query_list, suggest=False):
30
30
    """
31
31
    Search using bzr-search plugin to find revisions matching the query.
32
32
    This can either suggest query terms, or revision ids.
33
 
    
 
33
 
34
34
    param branch: branch object to search in
35
35
    param query_list: string to search
36
36
    param suggest: Optional flag to request suggestions instead of results
43
43
    except errors.NoSearchIndex:
44
44
        return None # None indicates could-not-search
45
45
    query = query_list.split(' ')
46
 
    query = [(term,) for term in query]
 
46
    query = [(term) for term in query]
47
47
    revid_list = []
48
48
    index._branch.lock_read()
49
49