Package grassyknoll :: Package backend :: Package lucene :: Module TermIterator
[hide private]

Module TermIterator

source code

Functions [hide private]
 
termIterator(reader, field, value='')
Wrap lucene term enumerator in Python iterator returning only term text, and ensure that we don't iterate past the end of the given field.
source code
 
termIteratorCount(reader, field, value='', count_needed=True)
Wrap lucene term enumerator in Python iterator returning (term text, count), and ensure that we don't iterate past the end of the given field.
source code
Function Details [hide private]

termIterator(reader, field, value='')

source code 
Wrap lucene term enumerator in Python iterator returning only term text, and ensure that we don't iterate past the end of the given field.
Parameters:
  • reader (IndexReader) - Lucene reader
  • field (String) - field name in index
  • value (String) - value to start enumerating with, defaults to '' (enumerate all values for this field)

termIteratorCount(reader, field, value='', count_needed=True)

source code 
Wrap lucene term enumerator in Python iterator returning (term text, count), and ensure that we don't iterate past the end of the given field.
Parameters:
  • reader (IndexReader) - Lucene reader
  • field (String) - field name in index
  • value (String) - value to start enumerating with, defaults to '' (enumerate all values for this field)
  • count_needed (Boolean) - whether we need an accurate count, or whether we can return as soon as we see a single valid document.