- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Xapian::MSet Class Reference

Class representing a list of search results. More...

## Public Member Functions
| MSet (const MSet &o)
| Copying is allowed.
MSet & | operator= (const MSet &o)
| Copying is allowed.
| MSet ()
| Default constructor.
| ~MSet ()
| Destructor.
std::string | snippet (const std::string &text, size_t length=500, const Xapian::Stem &stemmer=Xapian::Stem(), unsigned flags=SNIPPET_BACKGROUND_MODEL|SNIPPET_EXHAUSTIVE, const std::string &hi_start="<b>", const std::string &hi_end="</b>", const std::string &omit="...") const
| Generate a snippet.
void | fetch (const MSetIterator &begin, const MSetIterator &end) const
| Prefetch hint a range of items.
void | fetch (const MSetIterator &item) const
| Prefetch hint a single MSet item.
void | fetch () const
| Prefetch hint the whole MSet.
std::string | get_description () const
| Return a string describing this object.

## Detailed Description

Class representing a list of search results.

## Constructor & Destructor Documentation

Xapian::MSet::MSet | ( | const MSet & | o | ) |

Copying is allowed.

The internals are reference counted, so copying is cheap.

Xapian::MSet::MSet | ( |  | ) |

Default constructor.

Creates an empty MSet, mostly useful as a placeholder.

## Member Function Documentation

void Xapian::MSet::fetch | ( | const MSetIterator & | begin,
|  | const MSetIterator & | end
| ) |  | const
| inline

Prefetch hint a range of items.

For a remote database, this may start a pipelined fetched of the requested documents from the remote server.

For a disk-based database, this may send prefetch hints to the operating system such that the disk blocks the requested documents are stored in are more likely to be in the cache when we come to actually read them.

void Xapian::MSet::fetch | ( | const MSetIterator & | item | ) | const
| inline

Prefetch hint a single MSet item.

For a remote database, this may start a pipelined fetched of the requested documents from the remote server.

For a disk-based database, this may send prefetch hints to the operating system such that the disk blocks the requested documents are stored in are more likely to be in the cache when we come to actually read them.

void Xapian::MSet::fetch | ( |  | ) | const
| inline

Prefetch hint the whole MSet.

For a remote database, this may start a pipelined fetched of the requested documents from the remote server.

For a disk-based database, this may send prefetch hints to the operating system such that the disk blocks the requested documents are stored in are more likely to be in the cache when we come to actually read them.

MSet& Xapian::MSet::operator= | ( | const MSet & | o | ) |

Copying is allowed.

The internals are reference counted, so assignment is cheap.

std::string Xapian::MSet::snippet | ( | const std::string & | text,
|  | size_t | length = `500`,
|  | const Xapian::Stem & | stemmer = `Xapian::Stem()`,
|  | unsigned | flags = `SNIPPET_BACKGROUND_MODEL|SNIPPET_EXHAUSTIVE`,
|  | const std::string & | hi_start = `"<b>"`,
|  | const std::string & | hi_end = `"</b>"`,
|  | const std::string & | omit = `"..."`
| ) |  | const

Generate a snippet.

This method selects a continuous run of words of less than about length bytes from text, based mainly on where the query matches (currently terms, exact phrases and wildcards are taken into account), but also on the non-query terms in the text.

The returned text can be escaped (by default, it is escaped to make it suitable for use in HTML), and matches with the query will be highlighted using hi_start and hi_end.

If the snippet seems to start or end mid-sentence, then omit is prepended or append (respectively) to indicate this.

The stemmer used to build the query should be specified in stemmer.

And flags contains flags controlling behaviour.

The documentation for this class was generated from the following file:

- xapian/mset.h