strusAnalyzer  0.17
queryElementView.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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  */
11 #ifndef _STRUS_ANALYZER_QUERY_ELEMENT_VIEW_HPP_INCLUDED
12 #define _STRUS_ANALYZER_QUERY_ELEMENT_VIEW_HPP_INCLUDED
14 
16 namespace strus {
18 namespace analyzer {
19 
23 {
24 public:
29  :m_type(o.m_type),m_field(o.m_field),m_tokenizer(o.m_tokenizer),m_normalizer(o.m_normalizer),m_priority(o.m_priority){}
30 
37  QueryElementView( const std::string& type_, const std::string& field_, const FunctionView& tokenizer_, const std::vector<FunctionView>& normalizer_, int priority_)
38  :m_type(type_),m_field(field_),m_tokenizer(tokenizer_),m_normalizer(normalizer_),m_priority(priority_){}
39 
41  const std::string& type() const {return m_type;}
43  const std::string& field() const {return m_field;}
45  const FunctionView& tokenizer() const {return m_tokenizer;}
47  const std::vector<FunctionView>& normalizer() const {return m_normalizer;}
49  int priority() const {return m_priority;}
50 
51 private:
52  std::string m_type;
53  std::string m_field;
54  FunctionView m_tokenizer;
55  std::vector<FunctionView> m_normalizer;
56  int m_priority;
57 };
58 
59 }}//namespace
60 #endif
61 
const std::vector< FunctionView > & normalizer() const
Get the list of normalizers.
Definition: queryElementView.hpp:47
const std::string & type() const
Get the type.
Definition: queryElementView.hpp:41
QueryElementView()
Default constructor.
Definition: queryElementView.hpp:26
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Definition: functionView.hpp:29
Structure describing the internal representation of a feature in the document analyzer.
Definition: queryElementView.hpp:22
const std::string & field() const
Get the name of the query field.
Definition: queryElementView.hpp:43
QueryElementView(const std::string &type_, const std::string &field_, const FunctionView &tokenizer_, const std::vector< FunctionView > &normalizer_, int priority_)
Constructor.
Definition: queryElementView.hpp:37
int priority() const
Get the priority of the feature.
Definition: queryElementView.hpp:49
const FunctionView & tokenizer() const
Get the tokenizer.
Definition: queryElementView.hpp:45
QueryElementView(const QueryElementView &o)
Copy constructor.
Definition: queryElementView.hpp:28