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

Loading...
Searching...
No Matches
SpanNotQuery.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 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
21 LUCENE_CLASS(SpanNotQuery);
22
23 protected:
24 SpanQueryPtr include;
25 SpanQueryPtr exclude;
26
27 public:
28 using SpanQuery::toString;
29
31 SpanQueryPtr getInclude();
32
34 SpanQueryPtr getExclude();
35
36 virtual String getField();
37 virtual void extractTerms(SetTerm terms);
38 virtual String toString(const String& field);
39 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
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_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
SpanQuery.h
Lucene::LuceneObject::toString
virtual String toString()
Returns a string representation of the object.
Lucene::SpanNotQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::SpanNotQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
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.
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::getField
virtual String getField()
Returns the name of the field matched by this query.
Lucene::SpanNotQuery::~SpanNotQuery
virtual ~SpanNotQuery()
Lucene::SpanNotQuery::getExclude
SpanQueryPtr getExclude()
Return the SpanQuery whose matches must not overlap those returned.
Lucene::SpanNotQuery::include
SpanQueryPtr include
Definition SpanNotQuery.h:24
Lucene::SpanNotQuery::getInclude
SpanQueryPtr getInclude()
Return the SpanQuery whose matches are filtered.
Lucene::SpanNotQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
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::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::exclude
SpanQueryPtr exclude
Definition SpanNotQuery.h:25
Lucene::SpanQuery
Base class for span-based queries.
Definition SpanQuery.h:15
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition LuceneTypes.h:420
Lucene::SpansPtr
boost::shared_ptr< Spans > SpansPtr
Definition LuceneTypes.h:453
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::SpanQueryPtr
boost::shared_ptr< SpanQuery > SpanQueryPtr
Definition LuceneTypes.h:450
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net