xapian-core
1.4.27
|
MatchSpy implementation. More...
#include <config.h>
#include <xapian/matchspy.h>
#include <xapian/document.h>
#include <xapian/error.h>
#include <xapian/queryparser.h>
#include <xapian/registry.h>
#include <map>
#include <string>
#include <vector>
#include "autoptr.h"
#include "debuglog.h"
#include "noreturn.h"
#include "omassert.h"
#include "net/length.h"
#include "stringutils.h"
#include "str.h"
#include "termlist.h"
Go to the source code of this file.
Classes | |
class | ValueCountTermList |
A termlist iterator over the contents of a ValueCountMatchSpy. More... | |
class | StringAndFrequency |
A string with a corresponding frequency. More... | |
class | StringAndFreqCmpByFreq |
Compare two StringAndFrequency objects. More... | |
class | StringAndFreqTermList |
A termlist iterator over a vector of StringAndFrequency objects. More... | |
Functions | |
static void | unsupported_method () |
static void | get_most_frequent_items (vector< StringAndFrequency > &result, const map< string, doccount > &items, size_t maxitems) |
Get the most frequent items from a map from string to frequency. More... | |
MatchSpy implementation.
Definition in file matchspy.cc.
|
static |
Get the most frequent items from a map from string to frequency.
This takes input such as that in ValueCountMatchSpy::Internal::values and returns a vector of the most frequent items in the input.
result | A vector which will be filled with the most frequent items, in descending order of frequency. Items with the same frequency will be sorted in ascending alphabetical order. |
items | The map from string to frequency, from which the most frequent items will be selected. |
maxitems | The maximum number of items to return. |
Definition at line 262 of file matchspy.cc.
References Assert.
Referenced by Xapian::ValueCountMatchSpy::top_values_begin().
|
static |
Definition at line 86 of file matchspy.cc.
Referenced by ValueCountTermList::get_approx_size(), StringAndFreqTermList::get_approx_size(), Xapian::MatchSpy::get_description(), ValueCountTermList::get_wdf(), StringAndFreqTermList::get_wdf(), ValueCountTermList::positionlist_begin(), StringAndFreqTermList::positionlist_begin(), ValueCountTermList::positionlist_count(), and StringAndFreqTermList::positionlist_count().