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


SpanNotQuery.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 SPANNOTQUERY_H
8 #define SPANNOTQUERY_H
9 
10 #include "SpanQuery.h"
11 
12 namespace Lucene {
13 
15 class LPPAPI SpanNotQuery : public SpanQuery {
16 public:
18  SpanNotQuery(const SpanQueryPtr& include, const SpanQueryPtr& exclude);
19  virtual ~SpanNotQuery();
20 
22 
23 protected:
26 
27 public:
28  using SpanQuery::toString;
29 
32 
35 
36  virtual String getField();
37  virtual void extractTerms(SetTerm terms);
38  virtual String toString(const String& field);
40  virtual SpansPtr getSpans(const IndexReaderPtr& reader);
41  virtual QueryPtr rewrite(const IndexReaderPtr& reader);
42 
43  virtual bool equals(const LuceneObjectPtr& other);
44  virtual int32_t hashCode();
45 };
46 
47 }
48 
49 #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::SpanNotQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::SpanNotQuery::getField
virtual String getField()
Returns the name of the field matched by this query.
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition: LuceneTypes.h:539
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition: LuceneTypes.h:420
Lucene::SpanNotQuery::~SpanNotQuery
virtual ~SpanNotQuery()
Lucene::SpanNotQuery
Removes matches which overlap with another SpanQuery.
Definition: SpanNotQuery.h:15
Lucene::SpanNotQuery::getSpans
virtual SpansPtr getSpans(const IndexReaderPtr &reader)
Returns the matches for this query in an index. Used internally to search for spans.
Lucene::SpanNotQuery::rewrite
virtual QueryPtr rewrite(const IndexReaderPtr &reader)
Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into ...
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::SpanNotQuery::include
SpanQueryPtr include
Definition: SpanNotQuery.h:21
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition: LuceneTypes.h:157
Lucene::SpanNotQuery::getInclude
SpanQueryPtr getInclude()
Return the SpanQuery whose matches are filtered.
Lucene::SpanNotQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::SpanNotQuery::extractTerms
virtual void extractTerms(SetTerm terms)
Adds all terms occurring in this query to the terms set. Only works if this query is in its rewritten...
Lucene::SpanNotQuery::toString
virtual String toString(const String &field)
Prints a query to a string, with field assumed to be the default field and omitted.
Lucene::SpanNotQuery::exclude
SpanQueryPtr exclude
Definition: SpanNotQuery.h:25
SpanQuery.h
Lucene::SpansPtr
boost::shared_ptr< Spans > SpansPtr
Definition: LuceneTypes.h:453
Lucene::SpanNotQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::SpanNotQuery::getExclude
SpanQueryPtr getExclude()
Return the SpanQuery whose matches must not overlap those returned.
Lucene::Query::toString
virtual String toString()
Prints a query to a string.
Lucene::SpanNotQuery::SpanNotQuery
SpanNotQuery(const SpanQueryPtr &include, const SpanQueryPtr &exclude)
Construct a SpanNotQuery matching spans from include which have no overlap with spans from exclude.

clucene.sourceforge.net