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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SpanFirstQuery.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 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 
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

clucene.sourceforge.net