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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SpanNearQuery.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 SPANNEARQUERY_H
8 #define SPANNEARQUERY_H
9 
10 #include "SpanQuery.h"
11 
12 namespace Lucene
13 {
16  class LPPAPI SpanNearQuery : public SpanQuery
17  {
18  public:
22  SpanNearQuery(Collection<SpanQueryPtr> clauses, int32_t slop, bool inOrder, bool collectPayloads = true);
23  virtual ~SpanNearQuery();
24 
26 
27  protected:
29  int32_t slop;
30  bool inOrder;
31 
32  String field;
34 
35  public:
36  using SpanQuery::toString;
37 
39  Collection<SpanQueryPtr> getClauses();
40 
42  int32_t getSlop();
43 
45  bool isInOrder();
46 
47  virtual String getField();
48  virtual void extractTerms(SetTerm terms);
49  virtual String toString(const String& field);
50  virtual SpansPtr getSpans(IndexReaderPtr reader);
51  virtual QueryPtr rewrite(IndexReaderPtr reader);
52  virtual LuceneObjectPtr clone(LuceneObjectPtr other = LuceneObjectPtr());
53  virtual bool equals(LuceneObjectPtr other);
54  virtual int32_t hashCode();
55  };
56 }
57 
58 #endif

clucene.sourceforge.net