Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
TermQuery.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 TERMQUERY_H
8
#define TERMQUERY_H
9
10
#include "
Query.h
"
11
12
namespace
Lucene
{
13
16
class
LPPAPI
TermQuery
:
public
Query
{
17
public
:
19
TermQuery
(
const
TermPtr
&
term
);
20
21
virtual
~TermQuery
();
22
23
LUCENE_CLASS
(
TermQuery
);
24
25
protected
:
26
TermPtr
term
;
27
28
public
:
29
using
Query::toString
;
30
32
TermPtr
getTerm
();
33
34
virtual
WeightPtr
createWeight
(
const
SearcherPtr
& searcher);
35
virtual
void
extractTerms
(SetTerm terms);
36
38
virtual
String
toString
(
const
String& field);
39
40
virtual
bool
equals
(
const
LuceneObjectPtr
& other);
41
virtual
int32_t
hashCode
();
42
virtual
LuceneObjectPtr
clone
(
const
LuceneObjectPtr
& other =
LuceneObjectPtr
());
43
44
friend
class
TermWeight
;
45
};
46
47
}
48
49
#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Query.h
Lucene::Query::Query
Query()
Lucene::Query::toString
virtual String toString(const String &field)
Prints a query to a string, with field assumed to be the default field and omitted.
Lucene::TermQuery::createWeight
virtual WeightPtr createWeight(const SearcherPtr &searcher)
Constructs an appropriate Weight implementation for this query. Only implemented by primitive queries...
Lucene::TermQuery::~TermQuery
virtual ~TermQuery()
Lucene::TermQuery::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::TermQuery::TermQuery
TermQuery(const TermPtr &term)
Constructs a query for the term.
Lucene::TermQuery::clone
virtual LuceneObjectPtr clone(const LuceneObjectPtr &other=LuceneObjectPtr())
Returns a clone of this query.
Lucene::TermQuery::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::TermQuery::toString
virtual String toString(const String &field)
Prints a user-readable version of this query.
Lucene::TermQuery::getTerm
TermPtr getTerm()
Returns the term of this query.
Lucene::TermQuery::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::TermQuery::TermWeight
friend class TermWeight
Definition
TermQuery.h:44
Lucene::TermQuery::term
TermPtr term
Definition
TermQuery.h:26
Lucene
Definition
AbstractAllTermDocs.h:12
Lucene::WeightPtr
boost::shared_ptr< Weight > WeightPtr
Definition
LuceneTypes.h:480
Lucene::SearcherPtr
boost::shared_ptr< Searcher > SearcherPtr
Definition
LuceneTypes.h:434
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition
LuceneTypes.h:539
Lucene::TermPtr
boost::shared_ptr< Term > TermPtr
Definition
LuceneTypes.h:233
clucene.sourceforge.net