Home | Trees | Indices | Help |
|
---|
|
object --+ | SearchResults
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
more_matches Check whether there are further matches after those in this result set. |
|
startrank Get the rank of the first item in the search results. |
|
endrank Get the rank of the item after the end of the search results. |
|
matches_lower_bound Get a lower bound on the total number of matching documents. |
|
matches_upper_bound Get an upper bound on the total number of matching documents. |
|
matches_human_readable_estimate Get a human readable estimate of the number of matching documents. |
|
matches_estimated Get an estimate for the total number of matching documents. |
|
estimate_is_exact Check whether the estimated number of matching documents is exact. |
|
Inherited from |
Method Details |
|
|
Get an iterator over the hits in the search result. The iterator returns the results in increasing order of rank. |
Get the number of hits in the search result. Note that this is not (usually) the number of matching documents for the search. If startrank is non-zero, it's not even the rank of the last document in the search result. It's simply the number of hits stored in the search result. It is, however, the number of items returned by the iterator produced by calling iter() on this SearchResults object. |
Get the most frequent tags in a given field.
Returns a sequence of 2-item tuples, in which the first item in the tuple is the tag, and the second is the frequency of the tag in the matches seen (as an integer). |
Get a suggested set of facets, to present to the user. This returns a list, in descending order of the usefulness of the facet, in which each item is a tuple holding:
If required_facets is not None, it must be a field name, or a sequence of field names. Any field names mentioned in required_facets will be returned if there are any facet values at all in the search results for that field. The facet will only be omitted if there are no facet values at all for the field. The value of maxfacets will be respected as far as possible; the exception is that if there are too many fields listed in required_facets with at least one value in the search results, extra facets will be returned (ie, obeying the required_facets parameter is considered more important than the maxfacets parameter). If facet_hierarchy was indicated when search() was called, and the query included facets, then only subfacets of those query facets and top-level facets will be included in the returned list. Furthermore top-level facets will only be returned if there are remaining places in the list after it has been filled with subfacets. Note that required_facets is still respected regardless of the facet hierarchy. If a query type was specified when search() was called, and the query included facets, then facets with an association of Never to the query type are never returned, even if mentioned in required_facets. Facets with an association of Preferred are listed before others in the returned list. |
Property Details |
more_matchesCheck whether there are further matches after those in this result set.
|
startrankGet the rank of the first item in the search results. This corresponds to the "startrank" parameter passed to the search() method.
|
endrankGet the rank of the item after the end of the search results. If there are sufficient results in the index, this corresponds to the "endrank" parameter passed to the search() method.
|
matches_lower_boundGet a lower bound on the total number of matching documents.
|
matches_upper_boundGet an upper bound on the total number of matching documents.
|
matches_human_readable_estimateGet a human readable estimate of the number of matching documents. This consists of the value returned by the "matches_estimated" property, rounded to an appropriate number of significant digits (as determined by the values of the "matches_lower_bound" and "matches_upper_bound" properties).
|
matches_estimatedGet an estimate for the total number of matching documents.
|
estimate_is_exactCheck whether the estimated number of matching documents is exact. If this returns true, the estimate given by the matches_estimated property is guaranteed to be correct. If this returns false, it is possible that the actual number of matching documents is different from the number given by the matches_estimated property.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Tue Apr 29 09:21:55 2008 | http://epydoc.sourceforge.net |