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

Loading...
Searching...
No Matches
QueryTermVector.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 QUERYTERMVECTOR_H
8#define QUERYTERMVECTOR_H
9
10#include "TermFreqVector.h"
11
12 namespace Lucene {
13
14 class LPPAPI QueryTermVector : public TermFreqVector, public LuceneObject {
15 public:
17 QueryTermVector(Collection<String> queryTerms);
18 QueryTermVector(const String& queryString, const AnalyzerPtr& analyzer);
19
20 virtual ~QueryTermVector();
21
22 LUCENE_CLASS(QueryTermVector);
23
24 protected:
25 Collection<String> terms;
26 Collection<int32_t> termFreqs;
27
28 public:
29 virtual String toString();
30
31 int32_t size();
32 Collection<String> getTerms();
33 Collection<int32_t> getTermFrequencies();
34 int32_t indexOf(const String& term);
35 Collection<int32_t> indexesOf(Collection<String> terms, int32_t start, int32_t length);
36
37 protected:
38 void processTerms(Collection<String> queryTerms);
39};
40
41}
42
43#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
TermFreqVector.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene::QueryTermVector::getTerms
Collection< String > getTerms()
Lucene::QueryTermVector::~QueryTermVector
virtual ~QueryTermVector()
Lucene::QueryTermVector::terms
Collection< String > terms
Definition QueryTermVector.h:25
Lucene::QueryTermVector::indexesOf
Collection< int32_t > indexesOf(Collection< String > terms, int32_t start, int32_t length)
Just like indexOf(int) but searches for a number of terms at the same time. Returns an array that has...
Lucene::QueryTermVector::indexOf
int32_t indexOf(const String &term)
Return an index in the term numbers array returned from getTerms at which the term with the specified...
Lucene::QueryTermVector::size
int32_t size()
Lucene::QueryTermVector::toString
virtual String toString()
Returns a string representation of the object.
Lucene::QueryTermVector::processTerms
void processTerms(Collection< String > queryTerms)
Lucene::QueryTermVector::QueryTermVector
QueryTermVector(const String &queryString, const AnalyzerPtr &analyzer)
Lucene::QueryTermVector::QueryTermVector
QueryTermVector(Collection< String > queryTerms)
Lucene::QueryTermVector::termFreqs
Collection< int32_t > termFreqs
Definition QueryTermVector.h:26
Lucene::QueryTermVector::getTermFrequencies
Collection< int32_t > getTermFrequencies()
Array of term frequencies. Locations of the array correspond one to one to the terms in the array obt...
Lucene::TermFreqVector::TermFreqVector
TermFreqVector()
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::AnalyzerPtr
boost::shared_ptr< Analyzer > AnalyzerPtr
Definition LuceneTypes.h:20

clucene.sourceforge.net