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

Loading...
Searching...
No Matches
FieldDocSortedHitQueue.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 FIELDDOCSORTEDHITQUEUE_H
8#define FIELDDOCSORTEDHITQUEUE_H
9
10#include "PriorityQueue.h"
11
12 namespace Lucene {
13
16 class FieldDocSortedHitQueue : public PriorityQueue<FieldDocPtr> {
17 public:
18 FieldDocSortedHitQueue(int32_t size);
19 virtual ~FieldDocSortedHitQueue();
20
21 LUCENE_CLASS(FieldDocSortedHitQueue);
22
23 public:
24 Collection<SortFieldPtr> fields;
25
26 // used in the case where the fields are sorted by locale based strings
27 Collection<CollatorPtr> collators;
28
29 public:
34 void setFields(Collection<SortFieldPtr> fields);
35
37 Collection<SortFieldPtr> getFields();
38
39 protected:
44 Collection<CollatorPtr> hasCollators(Collection<SortFieldPtr> fields);
45
47 virtual bool lessThan(const FieldDocPtr& first, const FieldDocPtr& second);
48};
49
50}
51
52#endif
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
PriorityQueue.h
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::FieldDocSortedHitQueue::lessThan
virtual bool lessThan(const FieldDocPtr &first, const FieldDocPtr &second)
Returns whether first is less relevant than second.
Lucene::FieldDocSortedHitQueue::fields
Collection< SortFieldPtr > fields
Definition FieldDocSortedHitQueue.h:24
Lucene::FieldDocSortedHitQueue::~FieldDocSortedHitQueue
virtual ~FieldDocSortedHitQueue()
Lucene::FieldDocSortedHitQueue::setFields
void setFields(Collection< SortFieldPtr > fields)
Allows redefinition of sort fields if they are null. This is to handle the case using ParallelMultiSe...
Lucene::FieldDocSortedHitQueue::FieldDocSortedHitQueue
FieldDocSortedHitQueue(int32_t size)
Lucene::FieldDocSortedHitQueue::collators
Collection< CollatorPtr > collators
Definition FieldDocSortedHitQueue.h:27
Lucene::FieldDocSortedHitQueue::hasCollators
Collection< CollatorPtr > hasCollators(Collection< SortFieldPtr > fields)
Returns an array of collators, possibly null. The collators correspond to any SortFields which were g...
Lucene::FieldDocSortedHitQueue::getFields
Collection< SortFieldPtr > getFields()
Returns the fields being used to sort.
Lucene::PriorityQueue< FieldDocPtr >::size
int32_t size() const
Definition PriorityQueue.h:133
Lucene::PriorityQueue< FieldDocPtr >::PriorityQueue
PriorityQueue(int32_t maxSize)
Definition PriorityQueue.h:24
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::FieldDocPtr
boost::shared_ptr< FieldDoc > FieldDocPtr
Definition LuceneTypes.h:350

clucene.sourceforge.net