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. 5 ///////////////////////////////////////////////////////////////////////////// 6 7 #include "LuceneInc.h" 8 #include "TopDocs.h" 9 10 namespace Lucene { 11 TopDocs(int32_t totalHits,Collection<ScoreDocPtr> scoreDocs)12TopDocs::TopDocs(int32_t totalHits, Collection<ScoreDocPtr> scoreDocs) { 13 this->totalHits = totalHits; 14 this->scoreDocs = scoreDocs; 15 this->maxScore = std::numeric_limits<double>::quiet_NaN(); 16 } 17 TopDocs(int32_t totalHits,Collection<ScoreDocPtr> scoreDocs,double maxScore)18TopDocs::TopDocs(int32_t totalHits, Collection<ScoreDocPtr> scoreDocs, double maxScore) { 19 this->totalHits = totalHits; 20 this->scoreDocs = scoreDocs; 21 this->maxScore = maxScore; 22 } 23 ~TopDocs()24TopDocs::~TopDocs() { 25 } 26 getMaxScore()27double TopDocs::getMaxScore() { 28 return maxScore; 29 } 30 setMaxScore(double maxScore)31void TopDocs::setMaxScore(double maxScore) { 32 this->maxScore = maxScore; 33 } 34 35 } 36