Hmm, I mistyped my change - of course it should be
test_term(TEST_RU.encode('cp1251'))
Anyhow:
(Pdb) print list(term_index.iter_all_entries())
[(<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('1',), '4 1 765 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('2',), '5 1 925 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('bar',), '1 1 445 142'), (<bzrlib.plugins.search.index.SuggestableBTreeGraphIndex object at 0x2617190>, ('foo',), '0 1 285 142')]
This indicates that only four terms were found during the index phase: 1, 2, bar and foo. So the cp1251 string is being treated as whitespace or something similar.
Hmm, I mistyped my change - of course it should be TEST_RU. encode( 'cp1251' ))
test_term(
Anyhow:
(Pdb) print list(term_ index.iter_ all_entries( )) plugins. search. index.Suggestab leBTreeGraphInd ex object at 0x2617190>, ('1',), '4 1 765 142'), (<bzrlib. plugins. search. index.Suggestab leBTreeGraphInd ex object at 0x2617190>, ('2',), '5 1 925 142'), (<bzrlib. plugins. search. index.Suggestab leBTreeGraphInd ex object at 0x2617190>, ('bar',), '1 1 445 142'), (<bzrlib. plugins. search. index.Suggestab leBTreeGraphInd ex object at 0x2617190>, ('foo',), '0 1 285 142')]
[(<bzrlib.
This indicates that only four terms were found during the index phase: 1, 2, bar and foo. So the cp1251 string is being treated as whitespace or something similar.