An index.
More...
#include <index.h>
|
| | Index (const Configuration &config) |
| | create an empty index More...
|
| |
| | Index (const Configuration &config, File *indexFile, File::Position oRoot, uint64 refCount=0) |
| | read an index More...
|
| |
| bool | operator! () const |
| |
| bool | hasCounts () const |
| |
| String | getName () const |
| |
| String | getConfig () const |
| |
| bool | makeSorted (sortStatus *st=0) |
| |
| File::Position | write (File *file, WriteStatus *st=0) |
| |
| uint64 | getTermCount () const |
| |
| Iter | begin () const |
| |
| Iter | begin (const String &key, bool *found=0) const |
| | find a key in the index More...
|
| |
| Iter | begin (int64 key, bool *found=0) const |
| |
| Iter | begin (const BytesRef &key, bool *found=0) const |
| |
| Iter | beginAdd (const String &key, bool *added) |
| | search for a key, adding if it's not there More...
|
| |
| Iter | beginAdd (int64 key, bool *added) |
| |
| Iter | beginAdd (const BytesRef &key, bool *added) |
| |
| Iter | end () const |
| |
| bool | regexOK () const |
| |
| String | next (const String &key) const |
| |
| bool | forEachTerm (Iter &begin, Iter &end, Sink *sink, const RefListCursor *refList=0) const |
| | traverse each term in the range [begin, end) More...
|
| |
| bool | forEachTerm (uint64 start, uint64 count, Sink *sink, const RefListCursor *refList=0) const |
| |
| bool | forEachTerm (Sink *sink, const RefListCursor *refList=0) const |
| |
| bool | forEachRef (Iter &begin, Iter &end, Sink *act) const |
| | traverse each ref in each term in the range [begin, end) More...
|
| |
| bool | forEachRef (uint64 start, uint64 count, Sink *act) const |
| |
| bool | forEachRef (Sink *act) const |
| |
An index.
Definition at line 24 of file index.h.
create an empty index
- Parameters
-
| config | use this configuration |
read an index
- Parameters
-
| config | use this configuration |
| indexFile | read from this file |
| oRoot | file position of index root |
| refCount | number of refs in the index's universe |
| bool Xpace::Index::operator! |
( |
| ) |
const |
- Returns
- true iff the index is empty
| bool Xpace::Index::hasCounts |
( |
| ) |
const |
- Returns
- true iff the index has term counts
| String Xpace::Index::getName |
( |
| ) |
const |
| String Xpace::Index::getConfig |
( |
| ) |
const |
- Returns
- Index's configuration
- Parameters
-
| file | write to this file (at current position) |
| st | status callback |
- Returns
- file position of index root
merge a list of indexes
- Parameters
-
| file | merge to this file |
| list | merge these indexes |
- Returns
- file position of index root
| uint64 Xpace::Index::getTermCount |
( |
| ) |
const |
- Returns
- the number of terms in the index
| Iter Xpace::Index::begin |
( |
| ) |
const |
- Returns
- Iter corresponding to the first term in the Index
| Iter Xpace::Index::begin |
( |
const String & |
key, |
|
|
bool * |
found = 0 |
|
) |
| const |
find a key in the index
- Parameters
-
| key | find this String |
| found | fillin true if key is found |
- Returns
- Iter corresponding to the key, next Iter if not found
- Parameters
-
- Return values
-
| found | fillin true if key is found |
- Returns
- Iter corresponding to the key, next Iter if not found
- Parameters
-
- Return values
-
| found | fillin true if key is found |
- Returns
- Iter corresponding to the key, next Iter if not found
search for a key, adding if it's not there
- Parameters
-
| key | find/add this String |
| added | fillin true if key was added |
- Returns
- Iter corresponding to the key
- Parameters
-
| key | find/add this int64 |
| added | fillin true if key was added |
- Returns
- Iter corresponding to the key
- Parameters
-
| key | find/add this Key |
| found | fillin true if key was added |
- Returns
- Iter corresponding to the key
| Iter Xpace::Index::end |
( |
| ) |
const |
- Returns
- the iter one past the end
| bool Xpace::Index::regexOK |
( |
| ) |
const |
- Returns
- true iff term can match a regular expression (next() must return something meaningful)
- Parameters
-
- Returns
- the next possible term of the same length after this one
traverse each term in the range [begin, end)
- Parameters
-
| begin | start here |
| end | end here |
| act | call this for each term |
| refList | if != 0, call act only for terms in this refList |
- Returns
- true if completed, false if stopped by callback
- Parameters
-
| start | start at the start'th term |
| count | for this many terms |
traverse each ref in each term in the range [begin, end)
- Parameters
-
| begin | start here |
| end | end here |
| act | call this for each term, and each ref |
- Returns
- true if completed, false if stopped by callback
- Parameters
-
| start | start at the start'th term |
| count | for this many terms |
- Returns
- true if completed, false if stopped by callback
| bool Xpace::Index::forEachRef |
( |
Sink * |
act | ) |
const |
|
inline |
| const char* Xpace::Index::FIELD_TAG |
|
static |
| const char* Xpace::Index::PARSED_TAG |
|
static |
The documentation for this class was generated from the following file: