This file is indexed.

/usr/include/xapian/constants.h is in libxapian-dev 1.4.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/** @file constants.h
 * @brief Constants in the Xapian namespace
 */
/* Copyright (C) 2012,2013,2014,2015,2016 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

#ifndef XAPIAN_INCLUDED_CONSTANTS_H
#define XAPIAN_INCLUDED_CONSTANTS_H

#if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
# error "Never use <xapian/constants.h> directly; include <xapian.h> instead."
#endif

namespace Xapian {

/** Create database if it doesn't already exist.
 *
 *  If no opening mode is specified, this is the default.
 */
const int DB_CREATE_OR_OPEN	 = 0x00;

/** Create database if it doesn't already exist, or overwrite if it does. */
const int DB_CREATE_OR_OVERWRITE = 0x01;

/** Create a new database.
 *
 *  If the database already exists, an exception will be thrown.
 */
const int DB_CREATE		 = 0x02;

/** Open an existing database.
 *
 *  If the database doesn't exist, an exception will be thrown.
 */
const int DB_OPEN		 = 0x03;

#ifdef XAPIAN_LIB_BUILD
/** @internal Bit mask for action codes. */
const int DB_ACTION_MASK_	 = 0x03;
#endif

/** Don't attempt to ensure changes have hit disk.
 *
 *  By default, Xapian ask the OS to ensure changes have hit disk (by calling
 *  fdatasync(), fsync() or similar functions).  If these calls do their job,
 *  this should mean that when WritableDatabase::commit() returns, the changes
 *  are durable, but this comes at a performance cost, and if you don't mind
 *  losing changes in the case of a crash, power failure, etc, then this option
 *  can speed up indexing significantly.
 */
const int DB_NO_SYNC		 = 0x04;

/** Try to ensure changes are really written to disk.
 *
 *  Generally fsync() and similar functions only ensure that data has been sent
 *  to the drive.  Modern drives have large write-back caches for performance,
 *  and a power failure could still lose data which is in the write-back cache
 *  waiting to be written.
 *
 *  Some platforms provide a way to ensure data has actually been written and
 *  setting DB_FULL_SYNC will attempt to do so where possible.  The downside is
 *  that committing changes takes longer, and other I/O to the same disk may be
 *  delayed too.
 *
 *  Currently only Mac OS X is supported, and only on some filing system types
 *  - if not supported, Xapian will use fsync() or similar instead.
 */
const int DB_FULL_SYNC		 = 0x08;

/** Update the database in-place.
 *
 *  Xapian's disk-based backends use block-based storage, with copy-on-write
 *  to allow the previous revision to be searched while a new revision forms.
 *
 *  This option means changed blocks get written back over the top of the
 *  old version.  The benefits of this are that less I/O is required during
 *  indexing, and the result of indexing is more compact.  The downsides are
 *  that you can't concurrently search while indexing, transactions can't be
 *  cancelled, and if indexing ends uncleanly (i.e. without commit() or
 *  WritableDatabase's destructor being called) then the database won't be
 *  usable.
 *
 *  Currently all the base files will be removed upon the first modification,
 *  and new base files will be written upon commit.  This prevents new
 *  readers from opening the database while it unsafe to do so, but there's
 *  not currently a mechanism in Xapian to handle notifying existing readers.
 */
const int DB_DANGEROUS		 = 0x10;

/** When creating a database, don't create a termlist table.
 *
 *  For backends which support it (currently glass), this will prevent creation
 *  of a termlist table.  This saves on the disk space that would be needed to
 *  store it, and the CPU and I/O needed to update it, but some features either
 *  inherently need the termlist table, or the current implementation of them
 *  requires it.
 *
 *  The following probably can't be sensibly implemented without it:
 *
 *   - Database::termlist_begin()
 *   - Document::termlist_begin()
 *   - Document::termlist_count()
 *   - Enquire::get_eset()
 *
 *  And the following currently require it:
 *
 *   - Enquire::matching_terms_begin() - we could record this information
 *     during the match, though it might be hard to do without a speed penalty.
 *   - WritableDatabase::delete_document() - we could allow this with inexact
 *     statistics (like how Lucene does).
 *   - WritableDatabase::replace_document() if the document exists already
 *     (again, possible with inexact statistics).
 *   - Currently the list of which values are used in each document is stored
 *     in the termlist table, so things like iterating the values in a document
 *     require it (which is probably reasonable since iterating the terms in
 *     a document requires it).
 *
 *  You can also convert an existing database to not have a termlist table
 *  by simply deleting termlist.*.
 */
const int DB_NO_TERMLIST	 = 0x20;

/** If the database is already locked, retry the lock.
 *
 *  By default, if the database is already locked by a writer, trying to
 *  open it again for writing will fail by throwing Xapian::DatabaseLockError.
 *  If this flag is specified, then Xapian will instead wait for the lock
 *  (indefinitely, unless it gets an error trying to do so).
 */
const int DB_RETRY_LOCK		 = 0x40;

/** Use the glass backend.
 *
 *  When opening a WritableDatabase, this means create a glass database if a
 *  new database is created.  If there's an existing database (of any type)
 *  at the specified path, this flag has no effect.
 *
 *  When opening a Database, this flag means to only open it if it's a glass
 *  database.  There's rarely a good reason to do this - it's mostly provided
 *  as equivalent functionality to that provided by the namespaced open()
 *  functions in Xapian 1.2.
 */
const int DB_BACKEND_GLASS	 = 0x100;

/** Use the chert backend.
 *
 *  When opening a WritableDatabase, this means create a chert database if a
 *  new database is created.  If there's an existing database (of any type)
 *  at the specified path, this flag has no effect.
 *
 *  When opening a Database, this flag means to only open it if it's a chert
 *  database.  There's rarely a good reason to do this - it's mostly provided
 *  as equivalent functionality to Xapian::Chert::open() in Xapian 1.2.
 */
const int DB_BACKEND_CHERT	 = 0x200;

/** Open a stub database file.
 *
 *  When opening a Database, this flag means to only open it if it's a stub
 *  database file.  There's rarely a good reason to do this - it's mostly
 *  provided as equivalent functionality to Xapian::Auto::open_stub() in
 *  Xapian 1.2.
 */
const int DB_BACKEND_STUB	 = 0x300;

/** Use the "in memory" backend.
 *
 *  The filename is currently ignored when this flag is used, but an empty
 *  string should be passed to allow for future expansion.
 *
 *  A new empty database is created, so when creating a Database object this
 *  creates an empty read-only database - sometimes useful to avoid special
 *  casing this situation, but otherwise of limited use.  It's more useful
 *  when creating a WritableDatabase object, though beware that the current
 *  inmemory backend implementation was not built for performance and
 *  scalability.
 *
 *  This provides an equivalent to Xapian::InMemory::open() in Xapian 1.2.
 */
const int DB_BACKEND_INMEMORY	 = 0x400;

#ifdef XAPIAN_LIB_BUILD
/** @internal Bit mask for backend codes. */
const int DB_BACKEND_MASK_	 = 0x700;

/** @internal Used internally to signify opening read-only. */
const int DB_READONLY_		 = -1;
#endif


/** Show a short-format display of the B-tree contents.
 *
 *  For use with Xapian::Database::check().
 */
const int DBCHECK_SHORT_TREE = 1;

/** Show a full display of the B-tree contents.
 *
 *  For use with Xapian::Database::check().
 */
const int DBCHECK_FULL_TREE = 2;

/** Show the bitmap for the B-tree.
 *
 *  For use with Xapian::Database::check().
 */
const int DBCHECK_SHOW_FREELIST = 4;

/** Show statistics for the B-tree.
 *
 *  For use with Xapian::Database::check().
 */
const int DBCHECK_SHOW_STATS = 8;

/** Fix problems.
 *
 *  For use with Xapian::Database::check().
 *
 *  Currently this is supported for chert, and will:
 *
 *  @li regenerate the "iamchert" file if it isn't valid (so if it is lost, you
 *      can just create it empty and then "fix problems").
 *
 *  @li regenerate base files (currently the algorithm for finding the root
 *      block may not work if there was a change partly written but not
 *      committed).
 */
const int DBCHECK_FIX = 16;


/** Use the same document ids in the output as in the input(s).
 *
 *  By default compaction renumbers the document ids in the output database,
 *  currently by applying the same offset to all the document ids in a
 *  particular source database.  If this flag is specified, then this
 *  renumbering doesn't happen, but all the document ids must be unique over
 *  all source databases.  Currently the ranges of document ids in each source
 *  must not overlap either, though this restriction may be removed in the
 *  future.
 */
const int DBCOMPACT_NO_RENUMBER = 4;

/** If merging more than 3 databases, merge the postlists in multiple passes.
 *
 *  This is generally faster but requires more disk space for temporary files.
 */
const int DBCOMPACT_MULTIPASS = 8;

/** Produce a single-file database.
 *
 *  Only supported by the glass backend currently.
 */
const int DBCOMPACT_SINGLE_FILE = 16;

/** Assume document id is valid.
 *
 *  By default, Database::get_document() checks that the document id passed is
 *  actually in use and throws DocNotFoundError if not.  This flag can be used
 *  to disable this check - useful to save a bit of work when you know for sure
 *  that the document id is valid.
 *
 *  Some database backends may check anyway - the remote backend currently
 *  does.
 */
const int DOC_ASSUME_VALID = 1;

}

#endif /* XAPIAN_INCLUDED_CONSTANTS_H */