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

SpanFirstQuery.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 SPANFIRSTQUERY_H
8 #define SPANFIRSTQUERY_H
9
10 #include "SpanQuery.h"
11 #include "Spans.h"
12
13 namespace Lucene {
14
16 class LPPAPI SpanFirstQuery : public SpanQuery {
17 public:
19 SpanFirstQuery(const SpanQueryPtr& match, int32_t end);
20 virtual ~SpanFirstQuery();
21
22 LUCENE_CLASS(SpanFirstQuery);
23
24 protected:
25 SpanQueryPtr match;
26 int32_t end;
27
28 public:
29 using SpanQuery::toString;
30
32 SpanQueryPtr getMatch();
33
35 int32_t getEnd();
36
37 virtual String getField();
38 virtual String toString(const String& field);
39 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
40 virtual void extractTerms(SetTerm terms);
41 virtual SpansPtr getSpans(const IndexReaderPtr& reader);
42 virtual QueryPtr rewrite(const IndexReaderPtr& reader);
43
44 virtual bool equals(const LuceneObjectPtr& other);
45 virtual int32_t hashCode();
46
47 friend class FirstSpans;
48 };
49
50 }
51
52 #endif
Lucene::Query::toString
virtual String toString()
Prints a query to a string.
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::SpanQueryPtr
boost::shared_ptr< SpanQuery > SpanQueryPtr
Definition: LuceneTypes.h:450
SpanQuery.h
Lucene::SpanFirstQuery
Matches spans near the beginning of a field.
Definition: SpanFirstQuery.h:16
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::SpansPtr
boost::shared_ptr< Spans > SpansPtr
Definition: LuceneTypes.h:453
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::SpanQuery
Base class for span-based queries.
Definition: SpanQuery.h:15
Spans.h
Lucene::SpanFirstQuery::end
int32_t end
Definition: SpanFirstQuery.h:26

clucene.sourceforge.net