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

Loading...
Searching...
No Matches
SpanTermQuery.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 SPANTERMQUERY_H
8#define SPANTERMQUERY_H
9
10#include "SpanQuery.h"
11
12 namespace Lucene {
13
15 class LPPAPI SpanTermQuery : public SpanQuery {
16 public:
18 SpanTermQuery(const TermPtr& term);
19 virtual ~SpanTermQuery();
20
21 LUCENE_CLASS(SpanTermQuery);
22
23 protected:
24 TermPtr term;
25
26 public:
27 using SpanQuery::toString;
28
30 TermPtr getTerm();
31
32 virtual String getField();
33 virtual void extractTerms(SetTerm terms);
34 virtual String toString(const String& field);
35 virtual int32_t hashCode();
36 virtual bool equals(const LuceneObjectPtr& other);
37 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
38 virtual SpansPtr getSpans(const IndexReaderPtr& reader);
39};
40
41}
42
43#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::SpanQuery
Base class for span-based queries.
Definition SpanQuery.h:15
Lucene::SpanTermQuery::getTerm
TermPtr getTerm()
Return the term whose spans are matched.
Lucene::SpanTermQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::SpanTermQuery::getSpans
virtual SpansPtr getSpans(const IndexReaderPtr &reader)
Returns the matches for this query in an index. Used internally to search for spans.
Lucene::SpanTermQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::SpanTermQuery::SpanTermQuery
SpanTermQuery(const TermPtr &term)
Construct a SpanTermQuery matching the named term's spans.
Lucene::SpanTermQuery::getField
virtual String getField()
Returns the name of the field matched by this query.
Lucene::SpanTermQuery::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::SpanTermQuery::term
TermPtr term
Definition SpanTermQuery.h:24
Lucene::SpanTermQuery::toString
virtual String toString(const String &field)
Prints a query to a string, with field assumed to be the default field and omitted.
Lucene::SpanTermQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::SpanTermQuery::~SpanTermQuery
virtual ~SpanTermQuery()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::SpansPtr
boost::shared_ptr< Spans > SpansPtr
Definition LuceneTypes.h:453
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157

clucene.sourceforge.net