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

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

- File List
- Globals

SpanFilterResult.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 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 SPANFILTERRESULT_H
8 #define SPANFILTERRESULT_H
9
10 #include "LuceneObject.h"
11
12 namespace Lucene {
13
15 class LPPAPI SpanFilterResult : public LuceneObject {
16 public:
19 SpanFilterResult(const DocIdSetPtr& docIdSet, Collection<PositionInfoPtr> positions);
20
21 virtual ~SpanFilterResult();
22
23 LUCENE_CLASS(SpanFilterResult);
24
25 protected:
26 DocIdSetPtr docIdSet;
27 Collection<PositionInfoPtr> positions; // Spans spans
28
29 public:
33 Collection<PositionInfoPtr> getPositions();
34
36 DocIdSetPtr getDocIdSet();
37 };
38
39 class LPPAPI PositionInfo : public LuceneObject {
40 public:
41 PositionInfo(int32_t doc);
42 virtual ~PositionInfo();
43
44 LUCENE_CLASS(PositionInfo);
45
46 protected:
47 int32_t doc;
48 Collection<StartEndPtr> positions;
49
50 public:
51 void addPosition(int32_t start, int32_t end);
52 int32_t getDoc();
53 Collection<StartEndPtr> getPositions();
54 };
55
56 class LPPAPI StartEnd : public LuceneObject {
57 public:
58 StartEnd(int32_t start, int32_t end);
59 virtual ~StartEnd();
60
61 LUCENE_CLASS(StartEnd);
62
63 protected:
64 int32_t start;
65 int32_t end;
66
67 public:
69 int32_t getEnd();
70
72 int32_t getStart();
73 };
74
75 }
76
77 #endif
Lucene::DocIdSetPtr
boost::shared_ptr< DocIdSet > DocIdSetPtr
Definition: LuceneTypes.h:323
Lucene::StartEnd
Definition: SpanFilterResult.h:56
LuceneObject.h
Lucene::SpanFilterResult
The results of a SpanQueryFilter. Wraps the BitSet and the position information from the SpanQuery...
Definition: SpanFilterResult.h:15
Lucene::StartEnd::start
int32_t start
Definition: SpanFilterResult.h:61
Lucene::LuceneObject
Base class for all Lucene classes.
Definition: LuceneObject.h:31
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::PositionInfo
Definition: SpanFilterResult.h:39
Lucene::Collection< PositionInfoPtr >
Lucene::SpanFilterResult::positions
Collection< PositionInfoPtr > positions
Definition: SpanFilterResult.h:27
Lucene::PositionInfo::positions
Collection< StartEndPtr > positions
Definition: SpanFilterResult.h:48
Lucene::StartEnd::end
int32_t end
Definition: SpanFilterResult.h:65

clucene.sourceforge.net