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

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
57 LUCENE_CLASS(FieldMaskingSpanQuery);
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
Lucene::SpanQueryPtr
boost::shared_ptr< SpanQuery > SpanQueryPtr
Definition: LuceneTypes.h:450
Lucene::SpanQuery
Base class for span-based queries.
Definition: SpanQuery.h:15
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
Lucene::FieldMaskingSpanQuery::field
String field
Definition: FieldMaskingSpanQuery.h:61
Lucene::FieldMaskingSpanQuery
Wrapper to allow SpanQuery objects participate in composite single-field SpanQueries by 'lying' about...
Definition: FieldMaskingSpanQuery.h:52
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::WeightPtr
boost::shared_ptr< Weight > WeightPtr
Definition: LuceneTypes.h:480
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
SpanQuery.h
Lucene::SpansPtr
boost::shared_ptr< Spans > SpansPtr
Definition: LuceneTypes.h:453
Lucene::SimilarityPtr
boost::shared_ptr< Similarity > SimilarityPtr
Definition: LuceneTypes.h:435
Lucene::Query::toString
virtual String toString()
Prints a query to a string.
Lucene::SearcherPtr
boost::shared_ptr< Searcher > SearcherPtr
Definition: LuceneTypes.h:434

clucene.sourceforge.net