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

Loading...
Searching...
No Matches
ValueSourceQuery.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 VALUESOURCEQUERY_H
8#define VALUESOURCEQUERY_H
9
10#include "Query.h"
11
12 namespace Lucene {
13
22 class LPPAPI ValueSourceQuery : public Query {
23 public:
26 ValueSourceQuery(const ValueSourcePtr& valSrc);
27
28 virtual ~ValueSourceQuery();
29
30 LUCENE_CLASS(ValueSourceQuery);
31
32 public:
33 ValueSourcePtr valSrc;
34
35 public:
36 using Query::toString;
37
38 virtual QueryPtr rewrite(const IndexReaderPtr& reader);
39 virtual void extractTerms(SetTerm terms);
40 virtual WeightPtr createWeight(const SearcherPtr& searcher);
41 virtual String toString(const String& field);
42 virtual bool equals(const LuceneObjectPtr& other);
43 virtual int32_t hashCode();
44 virtual LuceneObjectPtr clone(const LuceneObjectPtr& other = LuceneObjectPtr());
45};
46
47}
48
49#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Query.h
Lucene::Query
The abstract base class for queries.
Definition Query.h:31
Lucene::ValueSourceQuery
A Query that sets the scores of document to the values obtained from a ValueSource.
Definition ValueSourceQuery.h:22
Lucene::ValueSourceQuery::ValueSourceQuery
ValueSourceQuery(const ValueSourcePtr &valSrc)
Create a value source query.
Lucene::ValueSourceQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::ValueSourceQuery::valSrc
ValueSourcePtr valSrc
Definition ValueSourceQuery.h:33
Lucene::ValueSourceQuery::createWeight
virtual WeightPtr createWeight(const SearcherPtr &searcher)
Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries...
Lucene::ValueSourceQuery::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::ValueSourceQuery::~ValueSourceQuery
virtual ~ValueSourceQuery()
Lucene::ValueSourceQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::ValueSourceQuery::rewrite
virtual QueryPtr rewrite(const IndexReaderPtr &reader)
Called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into ...
Lucene::ValueSourceQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::ValueSourceQuery::toString
virtual String toString(const String &field)
Prints a query to a string, with field assumed to be the default field and omitted.
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::QueryPtr
boost::shared_ptr< Query > QueryPtr
Definition LuceneTypes.h:420
Lucene::SearcherPtr
boost::shared_ptr< Searcher > SearcherPtr
Definition LuceneTypes.h:434
Lucene::ValueSourcePtr
boost::shared_ptr< ValueSource > ValueSourcePtr
Definition LuceneTypes.h:476
Lucene::IndexReaderPtr
boost::shared_ptr< IndexReader > IndexReaderPtr
Definition LuceneTypes.h:157
Lucene::WeightPtr
boost::shared_ptr< Weight > WeightPtr
Definition LuceneTypes.h:480

clucene.sourceforge.net