Lucene++ - a full-featured, c++ search engine
API Documentation

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files

- File List
- Globals

All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PhrasePositions.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2011 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef PHRASEPOSITIONS_H
8 #define PHRASEPOSITIONS_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene
13 {
15 class PhrasePositions : public LuceneObject
16 {
17 public:
18 PhrasePositions(TermPositionsPtr t, int32_t o);
19 virtual ~PhrasePositions();
20
21 LUCENE_CLASS(PhrasePositions);
22
23 public:
24 int32_t doc; // current doc
25 int32_t position; // position in doc
26 int32_t count; // remaining pos in this doc
27 int32_t offset; // position in phrase
28 TermPositionsPtr tp; // stream of positions
29 PhrasePositionsPtr _next; // used to make lists
30 bool repeats; // there's other pp for same term (eg. query="1st word 2nd word"~1)
31
32 public:
33 bool next();
34 bool skipTo(int32_t target);
35 void firstPosition();
36 bool nextPosition();
37 };
38 }
39
40 #endif

clucene.sourceforge.net