blob: a9a6e2ed95d9858b5f594b4183b4b14edac01d7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
//
// WordDead.h
//
// NAME
//
// list of documents that must be ignored and then deleted from the index.
//
// SYNOPSIS
//
// Helper for the WordList class.
//
// DESCRIPTION
//
// WordDead is a list of WordKey entries describing deleted documents.
// All inverted index entries that match a WordKey entry of the WordDead
// list are treated as if they do not appear in the inverted index.
//
//
//
// END
//
// Part of the ht://Dig package <http://www.htdig.org/>
// Copyright (c) 1999-2004 The ht://Dig Group
// For copyright details, see the file COPYING in your distribution
// or the GNU Library General Public License (LGPL) version 2 or later
// <http://www.gnu.org/copyleft/lgpl.html>
//
// $Id: WordDead.h,v 1.4 2004/05/28 13:15:26 lha Exp $
//
#ifndef _WordDead_h_
#define _WordDead_h_
#include <stdio.h>
#include "htString.h"
#include "WordDB.h"
class WordList;
class WordDeadCursor;
class WordDead
{
public:
WordDead() { words = 0; db = 0; mask = 0; }
~WordDead();
int Initialize(WordList* words);
int Open();
int Remove();
int Close();
int Mask(const WordKey& nmask) { *mask = nmask; return OK; }
List* Words() const;
int Normalize(WordKey& key) const;
int Exists(const WordKey& key) const;
int Put(const WordKey& key) const;
WordDeadCursor* Cursor() const;
int Next(WordDeadCursor* cursor, WordKey& key);
private:
WordList* words;
WordDB* db;
WordKey* mask;
};
#endif /* _WordDead_h_ */
|