strus  0.17
queryResult.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_QUERY_RESULT_HPP_INCLUDED
11 #define _STRUS_QUERY_RESULT_HPP_INCLUDED
12 #include "strus/index.hpp"
13 #include "strus/resultDocument.hpp"
14 #include <vector>
15 #include <string>
16 #include <utility>
17 
18 namespace strus {
19 
23 {
24 public:
27  :m_evaluationPass(0)
28  ,m_nofRanked(0)
29  ,m_nofVisited(0)
30  ,m_ranks(){}
33  :m_evaluationPass(o.m_evaluationPass)
34  ,m_nofRanked(o.m_nofRanked)
35  ,m_nofVisited(o.m_nofVisited)
36  ,m_ranks(o.m_ranks){}
39  unsigned int evaluationPass_,
40  unsigned int nofRanked_,
41  unsigned int nofVisited_,
42  const std::vector<ResultDocument>& ranks_)
43  :m_evaluationPass(evaluationPass_)
44  ,m_nofRanked(nofRanked_)
45  ,m_nofVisited(nofVisited_)
46  ,m_ranks(ranks_){}
47 
49  unsigned int evaluationPass() const {return m_evaluationPass;}
51  unsigned int nofRanked() const {return m_nofRanked;}
53  unsigned int nofVisited() const {return m_nofVisited;}
54 
56  const std::vector<ResultDocument>& ranks() const {return m_ranks;}
57 
58 private:
59  unsigned int m_evaluationPass;
60  unsigned int m_nofRanked;
61  unsigned int m_nofVisited;
62  std::vector<ResultDocument> m_ranks;
63 };
64 
65 }//namespace
66 #endif
67 
Result element of the query evaluation.
Numeric types used for local and global indices.
QueryResult()
Default constructor.
Definition: queryResult.hpp:26
QueryResult(unsigned int evaluationPass_, unsigned int nofRanked_, unsigned int nofVisited_, const std::vector< ResultDocument > &ranks_)
Constructor.
Definition: queryResult.hpp:38
unsigned int nofVisited() const
Get the total number of matches that were visited (after applying ACL restrictions, but before applying other restrictions)
Definition: queryResult.hpp:53
QueryResult(const QueryResult &o)
Copy constructor.
Definition: queryResult.hpp:32
const std::vector< ResultDocument > & ranks() const
Get the list of result elements.
Definition: queryResult.hpp:56
Structure defining the result of a strus query.
Definition: queryResult.hpp:22
unsigned int evaluationPass() const
Get the last query evaluation pass used (level of selection features used)
Definition: queryResult.hpp:49
unsigned int nofRanked() const
Get the total number of matches that were ranked (after applying all query restrictions) ...
Definition: queryResult.hpp:51