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


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FieldMaskingSpanQuery.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 FIELDMASKINGSPANQUERY_H
8 #define FIELDMASKINGSPANQUERY_H
9 
10 #include "SpanQuery.h"
11 
12 namespace Lucene {
13 
52 class LPPAPI FieldMaskingSpanQuery : public SpanQuery {
53 public:
54  FieldMaskingSpanQuery(const SpanQueryPtr& maskedQuery, const String& maskedField);
55  virtual ~FieldMaskingSpanQuery();
56 
58 
59 protected:
60  SpanQueryPtr maskedQuery;
61  String field;
62 
63 public:
64  using SpanQuery::toString;
65 
66  virtual String getField();
67  SpanQueryPtr getMaskedQuery();
68  virtual SpansPtr getSpans(const IndexReaderPtr& reader);
69  virtual void extractTerms(SetTerm terms);
70  virtual WeightPtr createWeight(const SearcherPtr& searcher);
71  virtual SimilarityPtr getSimilarity(const SearcherPtr& searcher);
72  virtual QueryPtr rewrite(const IndexReaderPtr& reader);
73 
74  virtual String toString(const String& field);
75  virtual bool equals(const LuceneObjectPtr& other);
76  virtual int32_t hashCode();
77 
79  virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
80 };
81 
82 }
83 
84 #endif
virtual String toString()
Prints a query to a string.
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about...
Definition: FieldMaskingSpanQuery.h:52
boost::shared_ptr< Weight > WeightPtr
Definition: LuceneTypes.h:480
boost::shared_ptr< Searcher > SearcherPtr
Definition: LuceneTypes.h:434
boost::shared_ptr< SpanQuery > SpanQueryPtr
Definition: LuceneTypes.h:450
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
boost::shared_ptr< Spans > SpansPtr
Definition: LuceneTypes.h:453
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
Base class for span-based queries.
Definition: SpanQuery.h:15
String field
Definition: FieldMaskingSpanQuery.h:61
boost::shared_ptr< Similarity > SimilarityPtr
Definition: LuceneTypes.h:435

clucene.sourceforge.net