Package grassyknoll :: Package backend :: Package lucene :: Module HitsWrapper :: Class HitsWrapper
[hide private]

Class HitsWrapper

source code


a lucene.Hits delegator that yields SmartHit subclasses

We support open intervals of the form hits[10:], but you almost certainly don't want to do this, as it will be slow.


Warning: Instances of this class are not threadsafe.

Instance Methods [hide private]
 
__init__(self, hits, klass)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__getattr__(self, attr) source code
 
__len__(self) source code
 
__extend_cache(self, n)
extend the internal cache s.t.
source code
 
__getitem__(self, x) source code
 
__iter__(self) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, hits, klass)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • hits (lucene.Hits) - the raw hits to wrap
  • klass (class) - type of hit to yield up
Overrides: object.__init__

__extend_cache(self, n)

source code 

extend the internal cache s.t. it contains n elements

the cache may contain less than n elements after calling this method if the underlying hits are exhausted.