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

Loading...
Searching...
No Matches
PayloadTermQuery.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 PAYLOADTERMQUERY_H
8#define PAYLOADTERMQUERY_H
9
10#include "SpanTermQuery.h"
11
12 namespace Lucene {
13
21 class LPPAPI PayloadTermQuery : public SpanTermQuery {
22 public:
23 PayloadTermQuery(const TermPtr& term, const PayloadFunctionPtr& function, bool includeSpanScore = true);
24 virtual ~PayloadTermQuery();
25
26 LUCENE_CLASS(PayloadTermQuery);
27
28 protected:
29 PayloadFunctionPtr function;
30 bool includeSpanScore;
31
32 public:
33 virtual WeightPtr createWeight(const SearcherPtr& searcher);
34
35 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
36 virtual bool equals(const LuceneObjectPtr& other);
37 virtual int32_t hashCode();
38
39 friend class PayloadTermWeight;
40 friend class PayloadTermSpanScorer;
41};
42
43}
44
45#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
SpanTermQuery.h
Lucene::PayloadTermQuery
This class is very similar to SpanTermQuery except that it factors in the value of the payload locate...
Definition PayloadTermQuery.h:21
Lucene::PayloadTermQuery::~PayloadTermQuery
virtual ~PayloadTermQuery()
Lucene::PayloadTermQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::PayloadTermQuery::function
PayloadFunctionPtr function
Definition PayloadTermQuery.h:29
Lucene::PayloadTermQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::PayloadTermQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::PayloadTermQuery::createWeight
virtual WeightPtr createWeight(const SearcherPtr &searcher)
Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries...
Lucene::PayloadTermQuery::includeSpanScore
bool includeSpanScore
Definition PayloadTermQuery.h:30
Lucene::PayloadTermQuery::PayloadTermQuery
PayloadTermQuery(const TermPtr &term, const PayloadFunctionPtr &function, bool includeSpanScore=true)
Lucene::SpanTermQuery
Matches spans containing a term.
Definition SpanTermQuery.h:15
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::PayloadFunctionPtr
boost::shared_ptr< PayloadFunction > PayloadFunctionPtr
Definition LuceneTypes.h:402
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::SearcherPtr
boost::shared_ptr< Searcher > SearcherPtr
Definition LuceneTypes.h:434
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition LuceneTypes.h:233
Lucene::WeightPtr
boost::shared_ptr< Weight > WeightPtr
Definition LuceneTypes.h:480

clucene.sourceforge.net