Back to index

plone3  3.1.7
Public Member Functions | Private Attributes | Static Private Attributes
AdvancedQuery.ranking.RankByQueries_Max Class Reference
Inheritance diagram for AdvancedQuery.ranking.RankByQueries_Max:
Inheritance graph
[legend]
Collaboration diagram for AdvancedQuery.ranking.RankByQueries_Max:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getQueryValueMax
def getQueryValueSum

Private Attributes

 _specs

Static Private Attributes

 _RankerClass = _RankerByQueries_Max

Detailed Description

Rank be the maximum of query values for mathing queries.

The rank of a document *d* is the maximal query value for
those queries that match *d*.

Definition at line 131 of file ranking.py.


Constructor & Destructor Documentation

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

Reimplemented from AdvancedQuery.ranking._RankByQueries.

Definition at line 139 of file ranking.py.

00139 
00140   def __init__(self, *specs):
00141     _RankByQueries.__init__(self, *specs)
00142     # merge successive queries with the same value
00143     nspecs = []; cv = None
00144     for v,q in self._specs:
00145       if v == cv:
00146         ls = nspecs[-1]
00147         nspecs[-1] = (ls[0], ls[1] | q)
00148       else: nspecs.append((v,q)); cv = v
00149     self._specs = nspecs

Here is the caller graph for this function:


Member Function Documentation

Definition at line 150 of file ranking.py.

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

Definition at line 58 of file ranking.py.

00058 
  def getQueryValueSum(self): return self._sum

Member Data Documentation

Reimplemented from AdvancedQuery.ranking._RankByQueries.

Definition at line 137 of file ranking.py.

Reimplemented from AdvancedQuery.ranking._RankByQueries.

Definition at line 148 of file ranking.py.


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