Comment 8 for bug 383102

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 383102] [NEW] bzr search can't find non-ascii text

On Tue, 2009-06-09 at 10:00 +0000, Alexander Belchenko wrote:

> I'm not familiar with bzr-search API unfortunately. Can you give me a
> template for the testing script?

For more, look at bzrlib.plugins.search.commands.cmd_search.

trans = get_transport(directory)
index = bzrlib.plugins.search.index.open_index_url(trans.base)
# query_list might be ['foo', 'bar']
query = [(query_item,) for query_item in query_list]
index._branch.lock_read()
print list(index.search(query))

So essentially, I'm asking for a value of query_list that I can use as
python source.

-Rob