Module XapianIndexer
source code
interface to the xapian indexing engine for the translate toolkit
Xapian v1.0 or higher is supported.
If you are interested in writing an interface for Xapian 0.x, then you
should checkout the following:
svn export -r 7235 https://translate.svn.sourceforge.net/svnroot/translate/src/branches/translate-search-indexer-generic-merging/translate/search/indexer/
It is not completely working, but it should give you a good start.
|
XapianDatabase
interface to the xapian (http://xapian.org) indexer
|
|
XapianEnquire
interface to the xapian object for storing sets of matches
|
|
__revision__ = ' $Id: XapianIndexer.py 10834 2009-04-09 14:40:0 ...
|
|
_MAX_TERM_LENGTH = 128
|
Imports:
sys,
CommonIndexer,
xapian,
os,
re
truncate the length of a term string length to the maximum allowed for
xapian terms
- Parameters:
term (str) - the value of the term, that should be truncated
taken (int) - since a term consists of the name of the term and its actual
value, this additional parameter can be used to reduce the
maximum count of possible characters
- Returns: str
- the truncated string
|
_extract_fieldvalues(match,
(result, fieldnames))
| source code
|
add a dict of field values to a list
usually this function should be used together with '_walk_matches' for
traversing a list of matches
- Parameters:
match (xapian.MSet) - a single match object
result (list of dict) - the resulting dict will be added to this list
fieldnames (list of str) - the names of the fields to be added to the dict
|
__revision__
- Value:
' $Id: XapianIndexer.py 10834 2009-04-09 14:40:06Z alaaosh $ '
|
|