Logo Search packages:      
Sourcecode: zope-advancedquery version File versions  Download package

def AdvancedQuery::ranking::RankByQueries_Max::__init__ (   self,
  specs 
)

each spec is a pair *query*, *value*.

Reimplemented from AdvancedQuery::ranking::_RankByQueries.

Definition at line 139 of file ranking.py.

00139                             :
    _RankByQueries.__init__(self, *specs)
    # merge successive queries with the same value
    nspecs = []; cv = None
    for v,q in self._specs:
      if v == cv:
        ls = nspecs[-1]
        nspecs[-1] = (ls[0], ls[1] | q)
      else: nspecs.append((v,q)); cv = v
    self._specs = nspecs

  def getQueryValueMax(self): return self._spec[-1][0]


Generated by  Doxygen 1.6.0   Back to index