translate.search.indexing.CommonIndexer.CommonEnquire

Package translate :: Package search :: Package indexing :: Module CommonIndexer :: Class CommonEnquire |
[hide private]
[frames] | no frames]

# Class CommonEnquire

source code

an enquire object contains the information about the result of a request

Instance Methods | [hide private]
__init__(self, enquire) intialization of a wrapper around enquires of different backends | source code
tuple of (returned number, available number, matches) "matches" is a dictionary of:
       ["rank", "percent", "document", "docid"]
get_matches(self, start, number) return a specified number of qualified matches of a previous query | source code
int |
get_matches_count(self) return the estimated number of matches | 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, enquire) (Constructor) | source code
intialization of a wrapper around enquires of different backends Parameters: `enquire` (xapian.Enquire | pylucene-enquire) - a previous enquire Overrides: object.__init__

### get_matches(self, start, number) | source code
return a specified number of qualified matches of a previous query Parameters: `start` (int) - index of the first match to return (starting from zero) `number` (int) - the number of matching entries to return Returns: tuple of (returned number, available number, matches) "matches" is a dictionary of:
       ["rank", "percent", "document", "docid"]
a set of matching entries and some statistics

### get_matches_count(self) | source code
return the estimated number of matches use "CommonIndexer.search" to retrieve the exact number of matches Returns: int the estimaed number of matches