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

Loading...
Searching...
No Matches
SpanFilterResult.h
Go to the documentation of this file.
1
2// 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
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene::PositionInfo::~PositionInfo
virtual ~PositionInfo()
Lucene::PositionInfo::addPosition
void addPosition(int32_t start, int32_t end)
Lucene::PositionInfo::getPositions
Collection< StartEndPtr > getPositions()
Lucene::PositionInfo::positions
Collection< StartEndPtr > positions
Definition SpanFilterResult.h:48
Lucene::PositionInfo::getDoc
int32_t getDoc()
Lucene::PositionInfo::PositionInfo
PositionInfo(int32_t doc)
Lucene::PositionInfo::doc
int32_t doc
Definition SpanFilterResult.h:47
Lucene::SpanFilterResult::getPositions
Collection< PositionInfoPtr > getPositions()
The first entry in the array corresponds to the first "on" bit. Entries are increasing by document or...
Lucene::SpanFilterResult::positions
Collection< PositionInfoPtr > positions
Definition SpanFilterResult.h:27
Lucene::SpanFilterResult::docIdSet
DocIdSetPtr docIdSet
Definition SpanFilterResult.h:26
Lucene::SpanFilterResult::SpanFilterResult
SpanFilterResult(const DocIdSetPtr &docIdSet, Collection< PositionInfoPtr > positions)
Lucene::SpanFilterResult::getDocIdSet
DocIdSetPtr getDocIdSet()
Returns the docIdSet.
Lucene::SpanFilterResult::~SpanFilterResult
virtual ~SpanFilterResult()
Lucene::StartEnd::StartEnd
StartEnd(int32_t start, int32_t end)
Lucene::StartEnd::~StartEnd
virtual ~StartEnd()
Lucene::StartEnd::getEnd
int32_t getEnd()
Lucene::StartEnd::start
int32_t start
Definition SpanFilterResult.h:64
Lucene::StartEnd::getStart
int32_t getStart()
Lucene::StartEnd::end
int32_t end
Definition SpanFilterResult.h:65
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::DocIdSetPtr
boost::shared_ptr< DocIdSet > DocIdSetPtr
Definition LuceneTypes.h:323

clucene.sourceforge.net