Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.search.Xapian.indexing.UnicodeQuery Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 encoding

Detailed Description

Xapian query object which automatically encodes unicode strings 

Definition at line 30 of file indexing.py.


Constructor & Destructor Documentation

def MoinMoin.search.Xapian.indexing.UnicodeQuery.__init__ (   self,
  args,
  kwargs 
)
@keyword encoding: specify the encoding manually (default: value of config.charset)

Definition at line 33 of file indexing.py.

00033 
00034     def __init__(self, *args, **kwargs):
00035         """
00036         @keyword encoding: specify the encoding manually (default: value of config.charset)
00037         """
00038         self.encoding = kwargs.get('encoding', config.charset)
00039 
00040         nargs = []
00041         for term in args:
00042             if isinstance(term, unicode):
00043                 term = term.encode(self.encoding)
00044             elif isinstance(term, list) or isinstance(term, tuple):
00045                 term = [t.encode(self.encoding) for t in term]
00046             nargs.append(term)
00047 
00048         Query.__init__(self, *nargs, **kwargs)
00049 


Member Data Documentation

Definition at line 37 of file indexing.py.


The documentation for this class was generated from the following file: