xapian-core  1.4.25
termgenerator_internal.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2012,2016 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
22 #define XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
23 
24 #include "xapian/intrusive_ptr.h"
25 #include <xapian/database.h>
26 #include <xapian/document.h>
27 #include <xapian/termgenerator.h>
28 #include <xapian/queryparser.h> // For Xapian::Stopper
29 #include <xapian/stem.h>
30 
31 namespace Xapian {
32 
33 class Stopper;
34 
36  friend class TermGenerator;
44  unsigned max_word_length;
46 
47  public:
48  Internal() : strategy(STEM_SOME), stopper(NULL), stop_mode(STOP_STEMMED),
49  cur_pos(0), flags(TermGenerator::flags(0)), max_word_length(64) { }
50  void index_text(Utf8Iterator itor,
52  const std::string & prefix,
53  bool with_positions);
54 };
55 
56 }
57 
58 #endif // XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
Xapian::Internal::opt_intrusive_ptr< const Stopper > stopper
Class representing a stemming algorithm.
Definition: stem.h:62
double weight
The weight of a document or term.
Definition: types.h:122
Parses a piece of text and generate terms.
Definition: termgenerator.h:48
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
stop_strategy
Stopper strategies, for use with set_stopper_strategy().
void index_text(Utf8Iterator itor, termcount weight, const std::string &prefix, bool with_positions)
stem_strategy
Stemming strategies, for use with set_stemming_strategy().
This class provides read/write access to a database.
Definition: database.h:789
parse free text and generate terms
API for working with Xapian databases.
int flags
For backward compatibility with Xapian 1.2.
Definition: termgenerator.h:98
Base class for objects managed by intrusive_ptr.
Definition: intrusive_ptr.h:49
An iterator which returns Unicode character values from a UTF-8 encoded string.
Definition: unicode.h:38
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:83
API for working with documents.
A smart pointer that optionally uses intrusive reference counting.
stemming algorithms
A handle representing a document in a Xapian database.
Definition: document.h:61
parsing a user query string to build a Xapian::Query object