strus  0.17
resultDocument.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_RESULT_DOCUMENT_HPP_INCLUDED
11 #define _STRUS_RESULT_DOCUMENT_HPP_INCLUDED
12 #include "strus/index.hpp"
14 #include "strus/summaryElement.hpp"
15 #include <vector>
16 
17 namespace strus {
18 
22  :public WeightedDocument
23 {
24 public:
29  :WeightedDocument(o),m_summaryElements(o.m_summaryElements){}
31  ResultDocument( const WeightedDocument& o, const std::vector<SummaryElement>& summaryElements_)
32  :WeightedDocument(o),m_summaryElements(summaryElements_){}
35  :WeightedDocument(o){}
37  ResultDocument( const Index& docno_, double weight_, const std::vector<SummaryElement>& summaryElements_)
38  :WeightedDocument(docno_,weight_),m_summaryElements(summaryElements_){}
39 
41  const std::vector<SummaryElement>& summaryElements() const {return m_summaryElements;}
42 
43 private:
44  std::vector<SummaryElement> m_summaryElements;
45 };
46 
47 }//namespace
48 #endif
49 
ResultDocument(const WeightedDocument &o, const std::vector< SummaryElement > &summaryElements_)
Constructor from a composition of the pure query evaluation result and the summary elements...
Definition: resultDocument.hpp:31
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
const std::vector< SummaryElement > & summaryElements() const
Get the list of summary elements of this result.
Definition: resultDocument.hpp:41
Numeric types used for local and global indices.
Structure defining one result element of a strus query.
Definition: resultDocument.hpp:21
ResultDocument(const WeightedDocument &o)
Constructor from a composition of the pure query evaluation result without summary elements...
Definition: resultDocument.hpp:34
Weighted document of the query evaluation (result document without attributes)
Pure ranking result of a strus query without the attributes.
Definition: weightedDocument.hpp:21
Element of summary (result of summarization)
ResultDocument(const Index &docno_, double weight_, const std::vector< SummaryElement > &summaryElements_)
Constructor from a composition its basic parts.
Definition: resultDocument.hpp:37
ResultDocument()
Default constructor.
Definition: resultDocument.hpp:26
ResultDocument(const ResultDocument &o)
Copy constructor.
Definition: resultDocument.hpp:28