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

Loading...
Searching...
No Matches
Sort.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 SORT_H
8#define SORT_H
9
10#include "LuceneObject.h"
11
12 namespace Lucene {
13
68 class LPPAPI Sort : public LuceneObject {
69 public:
73 Sort();
74
76 Sort(const SortFieldPtr& field);
77
79 Sort(Collection<SortFieldPtr> fields);
80
81 virtual ~Sort();
82
83 LUCENE_CLASS(Sort);
84
85 public:
87 Collection<SortFieldPtr> fields;
88
89 public:
93 static SortPtr RELEVANCE();
94
96 static SortPtr INDEXORDER();
97
99 void setSort(const SortFieldPtr& field);
100
102 void setSort(Collection<SortFieldPtr> fields);
103
106 Collection<SortFieldPtr> getSort();
107
108 virtual String toString();
109 virtual bool equals(const LuceneObjectPtr& other);
110 virtual int32_t hashCode();
111};
112
113}
114
115#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition LuceneObject.h:24
Lucene::Collection
Utility template class to handle collections that can be safely copied and shared.
Definition Collection.h:17
Lucene::LuceneObject
Base class for all Lucene classes.
Definition LuceneObject.h:31
Lucene::Sort
Encapsulates sort criteria for returned hits.
Definition Sort.h:68
Lucene::Sort::equals
virtual bool equals(const LuceneObjectPtr &other)
Return whether two objects are equal.
Lucene::Sort::INDEXORDER
static SortPtr INDEXORDER()
Represents sorting by index order.
Lucene::Sort::toString
virtual String toString()
Returns a string representation of the object.
Lucene::Sort::Sort
Sort(Collection< SortFieldPtr > fields)
Sorts in succession by the criteria in each SortField.
Lucene::Sort::Sort
Sort()
Sorts by computed relevance. This is the same sort criteria as calling Searcher#search() without a so...
Lucene::Sort::fields
Collection< SortFieldPtr > fields
Internal representation of the sort criteria.
Definition Sort.h:87
Lucene::Sort::~Sort
virtual ~Sort()
Lucene::Sort::setSort
void setSort(const SortFieldPtr &field)
Sets the sort to the given criteria.
Lucene::Sort::getSort
Collection< SortFieldPtr > getSort()
Representation of the sort criteria.
Lucene::Sort::RELEVANCE
static SortPtr RELEVANCE()
Represents sorting by computed relevance. Using this sort criteria returns the same results as callin...
Lucene::Sort::hashCode
virtual int32_t hashCode()
Return hash code for this object.
Lucene::Sort::setSort
void setSort(Collection< SortFieldPtr > fields)
Sets the sort to the given criteria in succession.
Lucene::Sort::Sort
Sort(const SortFieldPtr &field)
Sorts by the criteria in the given SortField.
Lucene
Definition AbstractAllTermDocs.h:12
Lucene::LuceneObjectPtr
boost::shared_ptr< LuceneObject > LuceneObjectPtr
Definition LuceneTypes.h:539
Lucene::SortFieldPtr
boost::shared_ptr< SortField > SortFieldPtr
Definition LuceneTypes.h:443
Lucene::SortPtr
boost::shared_ptr< Sort > SortPtr
Definition LuceneTypes.h:442

clucene.sourceforge.net