示例#1
0
 def _decode_search_doc(self, doc):
     resultdoc = MultiDict()
     for pair in doc.fields:
         ukey = unicode(pair.key, 'utf-8')
         uval = unicode(pair.value, 'utf-8')
         resultdoc.add(ukey, uval)
     return resultdoc.mixed()
示例#2
0
 def _decode_search_doc(self, doc):
     resultdoc = MultiDict()
     for pair in doc.fields:
         ukey = unicode(pair.key, 'utf-8')
         uval = unicode(pair.value, 'utf-8')
         resultdoc.add(ukey, uval)
     return resultdoc.mixed()
示例#3
0
 def _decode_search_doc(self, doc):
     resultdoc = MultiDict()
     for pair in doc.fields:
         if PY2:
             ukey = unicode(pair.key, 'utf-8')    # noqa
             uval = unicode(pair.value, 'utf-8')  # noqa
         else:
             ukey = bytes_to_str(pair.key)
             uval = bytes_to_str(pair.value)
         resultdoc.add(ukey, uval)
     return resultdoc.mixed()
示例#4
0
 def _decode_search_doc(self, doc):
     resultdoc = MultiDict()
     for pair in doc.fields:
         if PY2:
             ukey = unicode(pair.key, 'utf-8')  # noqa
             uval = unicode(pair.value, 'utf-8')  # noqa
         else:
             ukey = bytes_to_str(pair.key)
             uval = bytes_to_str(pair.value)
         resultdoc.add(ukey, uval)
     return resultdoc.mixed()