8 #ifndef _STRUS_BINDING_OBJECTS_HPP_INCLUDED
9 #define _STRUS_BINDING_OBJECTS_HPP_INCLUDED
16 #include <boost/shared_ptr.hpp>
21 #if defined DOXYGEN_JAVA
25 #elif defined DOXYGEN_PYTHON
28 #elif (defined STRUS_BOOST_PYTHON)
29 typedef boost::python::api::object FunctionObject;
30 typedef boost::python::api::object DataBlob;
31 typedef boost::python::api::object StringObject;
32 typedef std::string String;
33 typedef std::wstring WString;
34 typedef std::vector<int> IndexVector;
35 typedef std::vector<double> FloatVector;
36 typedef std::vector<std::string> StringVector;
38 #define String std::string
39 #define WString std::wstring
40 #define IndexVector std::vector<int>
41 #define StringVector std::vector<std::string>
42 #define FloatVector std::vector<double>
43 #if !defined DOXYGEN_PHP && !defined DOXYGEN_PYTHON
44 #define NormalizerVector std::vector<Normalizer>
46 #define TermVector std::vector<Term>
47 #define QueryTermVector std::vector<QueryTerm>
48 #define RankVector std::vector<Rank>
49 #define VecRankVector std::vector<VecRank>
50 #define SummaryElementVector std::vector<SummaryElement>
51 #define AttributeVector std::vector<Attribute>
52 #define MetaDataVector std::vector<MetaData>
53 #define DocumentFrequencyChangeVector std::vector<DocumentFrequencyChange>
63 #ifdef STRUS_BOOST_PYTHON
68 typedef void (*Deleter)(
void* obj);
71 explicit Reference( Deleter deleter_)
72 :m_ptr(),m_deleter(deleter_){}
75 Reference(
const Reference& o)
76 :m_ptr(o.m_ptr),m_deleter(o.m_deleter){}
81 void reset(
void* obj_=0)
83 m_ptr.reset( obj_, m_deleter);
87 Reference& operator = (
const Reference& o)
90 m_deleter = o.m_deleter;
95 const void*
get()
const {
return m_ptr.get();}
97 void*
get() {
return m_ptr.get();}
100 boost::shared_ptr<void> m_ptr;
101 void (*m_deleter)(
void* obj);
106 #if defined DOXYGEN_PHP || defined DOXYGEN_PYTHON
107 #error DOXYGEN_PYTHON
118 Tokenizer(
const Tokenizer& o)
119 :m_name(o.m_name),m_arguments(o.m_arguments){}
120 Tokenizer(
const String& name_,
const StringVector& arg_)
121 :m_name(name_),m_arguments(arg_){}
122 Tokenizer(
const String& name_,
const String& arg_)
125 m_arguments.push_back( arg_);
127 Tokenizer(
const String& name_,
const String& arg1_,
const String& arg2_)
128 :m_name(name_),m_arguments()
130 m_arguments.push_back( arg1_);
131 m_arguments.push_back( arg2_);
133 Tokenizer(
const String& name_)
134 :m_name(name_),m_arguments(){}
136 const String& name()
const {
return m_name;}
137 const StringVector& arguments()
const {
return m_arguments;}
139 void setName(
const String& name_) {m_name = name_;}
140 void addArgument(
const String& arg_) {m_arguments.push_back( arg_);}
141 void addArgumentInt(
long arg_);
142 void addArgumentFloat(
double arg_);
146 std::vector<std::string> m_arguments;
151 #if defined DOXYGEN_PHP || defined DOXYGEN_PYTHON
162 Normalizer(
const Normalizer& o)
163 :m_name(o.m_name),m_arguments(o.m_arguments){}
164 Normalizer(
const String& name_,
const StringVector& arg_)
165 :m_name(name_),m_arguments(arg_){}
166 Normalizer(
const String& name_,
const String& arg_)
169 m_arguments.push_back( arg_);
171 Normalizer(
const String& name_,
const String& arg1_,
const String& arg2_)
172 :m_name(name_),m_arguments()
174 m_arguments.push_back( arg1_);
175 m_arguments.push_back( arg2_);
177 Normalizer(
const String& name_)
178 :m_name(name_),m_arguments(){}
182 const String& name()
const {
return m_name;}
183 const StringVector& arguments()
const {
return m_arguments;}
185 void setName(
const String& name_) {m_name = name_;}
186 void addArgument(
const String& arg_) {m_arguments.push_back( arg_);}
187 void addArgumentInt(
long arg_);
188 void addArgumentFloat(
double arg_);
191 friend class QueryAnalyzer;
192 friend class DocumentAnalyzer;
195 std::vector<std::string> m_arguments;
199 #ifdef STRUS_BOOST_PYTHON
200 typedef std::vector<Normalizer> NormalizerVector;
202 #if defined DOXYGEN_PHP || defined DOXYGEN_PYTHON
203 class NormalizerVector
209 #if defined DOXYGEN_PHP || defined DOXYGEN_PYTHON
222 Aggregator(
const Aggregator& o)
223 :m_name(o.m_name),m_arguments(o.m_arguments){}
227 Aggregator(
const String& name_,
const StringVector& arg_)
228 :m_name(name_),m_arguments(arg_){}
232 Aggregator(
const String& name_,
const String& arg_)
235 m_arguments.push_back( arg_);
241 Aggregator(
const String& name_,
const String& arg1_,
const String& arg2_)
242 :m_name(name_),m_arguments()
244 m_arguments.push_back( arg1_);
245 m_arguments.push_back( arg2_);
249 Aggregator(
const String& name_)
250 :m_name(name_),m_arguments(){}
257 const String& name()
const {
return m_name;}
260 const StringVector& arguments()
const {
return m_arguments;}
264 void setName(
const String& name_) {m_name = name_;}
267 void addArgument(
const String& arg_) {m_arguments.push_back( arg_);}
270 void addArgumentInt(
long arg_);
273 void addArgumentFloat(
double arg_);
276 friend class DocumentAnalyzer;
279 std::vector<std::string> m_arguments;
283 #if defined DOXYGEN_LANG
315 Variant(
const Variant& o);
317 Variant(
unsigned int v);
323 Variant(
const String& v);
325 Variant(
const char* v);
329 bool defined()
const {
return m_type != Variant_UNDEFINED;}
332 VariantType type()
const {
return m_type;}
335 unsigned long getUInt()
const;
341 double getFloat()
const;
344 const char* getText()
const;
350 void assign(
const Variant& o);
353 void assignUint(
unsigned long v);
356 void assignInt(
long v);
359 void assignFloat(
double v);
362 void assignText(
const String& v);
364 Variant& operator=(
const Variant& o)
370 #ifdef STRUS_BOOST_PYTHON
371 bool operator==(
const Variant& o)
const
375 bool operator!=(
const Variant& o)
const
381 bool isEqual(
const Variant& o)
const;
384 friend class Storage;
385 friend class Summarizer;
386 friend class WeightingFunction;
387 friend class QueryEval;
388 friend class DocumentAnalyzer;
390 VariantValue m_value;
401 Term(
const String& type_,
const String& value_,
const Index& position_,
const Index& length_)
402 :m_type(type_),m_value(value_),m_position(position_),m_length(length_){}
405 :m_type(o.m_type),m_value(o.m_value),m_position(o.m_position),m_length(o.m_length){}
408 :m_position(0),m_length(0){}
411 const String&
type()
const {
return m_type;}
413 const String&
value()
const {
return m_value;}
414 #if defined STRUS_BOOST_PYTHON || defined DOXYGEN_PYTHON
415 WString ucvalue()
const;
417 Index position()
const {
return m_position;}
422 #ifdef STRUS_BOOST_PYTHON
423 bool operator==(
const Term& o)
const
425 return m_type == o.m_type && m_value == o.m_value && m_position == o.m_position && m_length == o.m_length;
427 bool operator!=(
const Term& o)
const
429 return m_type != o.m_type || m_value != o.m_value || m_position != o.m_position || m_length != o.m_length;
433 bool operator < (
const Term& o)
const;
441 #ifdef STRUS_BOOST_PYTHON
442 typedef std::vector<Term> TermVector;
453 :m_name(name_),m_value(value_){}
456 :m_name(o.m_name),m_value(o.m_value){}
459 :m_name(0),m_value(){}
462 const String&
name()
const {
return m_name;}
464 double value()
const {
return m_value.getFloat();}
466 #ifdef STRUS_BOOST_PYTHON
467 bool operator==(
const MetaData& o)
const
469 return (m_name == o.m_name && m_value == o.m_value);
471 bool operator!=(
const MetaData& o)
const
473 return (m_name != o.m_name || m_value != o.m_value);
480 #ifdef STRUS_BOOST_PYTHON
481 typedef std::vector<MetaData> MetaDataVector;
493 :m_name(name_),m_value(value_){}
496 :m_name(o.m_name),m_value(o.m_value){}
502 const String&
name()
const {
return m_name;}
504 const String&
value()
const {
return m_value;}
506 #if defined STRUS_BOOST_PYTHON || defined DOXYGEN_PYTHON
507 WString ucvalue()
const;
510 #ifdef STRUS_BOOST_PYTHON
511 bool operator==(
const Attribute& o)
const
513 return m_name == o.m_name && m_value == o.m_value;
515 bool operator!=(
const Attribute& o)
const
517 return m_name != o.m_name || m_value != o.m_value;
524 #ifdef STRUS_BOOST_PYTHON
525 typedef std::vector<Attribute> AttributeVector;
537 const String& mimeType_) :m_mimeType(mimeType_){}
540 const String& mimeType_,
541 const String& encoding_) :m_mimeType(mimeType_),m_encoding(encoding_){}
544 const String& mimeType_,
545 const String& encoding_,
546 const String& scheme_) :m_mimeType(mimeType_),m_scheme(scheme_),m_encoding(encoding_){}
552 bool valid()
const {
return !m_mimeType.empty();}
556 void setMimeType(
const String& mimeType_) {m_mimeType = mimeType_;}
559 void setScheme(
const String& scheme_) {m_scheme = scheme_;}
562 void setEncoding(
const String& encoding_) {m_encoding = encoding_;}
566 const String&
mimeType()
const {
return m_mimeType;}
569 const String&
scheme()
const {
return m_scheme;}
572 const String&
encoding()
const {
return m_encoding;}
575 std::string m_mimeType;
576 std::string m_scheme;
577 std::string m_encoding;
595 void addSearchIndexTerm(
const String& type,
const String& value,
const Index& position);
600 void addForwardIndexTerm(
const String& type,
const String& value,
const Index& position);
602 void setMetaData(
const String& name,
const Variant& value);
607 #ifdef STRUS_BOOST_PYTHON
608 void setMetaData_double(
const String& name,
double value)
610 setMetaData( name, value);
612 void setMetaData_int(
const String& name,
int value)
614 setMetaData( name, value);
616 void setMetaData_uint(
const String& name,
unsigned int value)
618 setMetaData( name, value);
621 void setMetaData(
const String& name,
double value);
628 void setMetaData(
const String& name,
int value);
632 void setMetaData(
const String& name,
unsigned int value);
636 void setAttribute(
const String& name,
const String& value);
637 #ifdef STRUS_BOOST_PYTHON
638 void setAttribute_obj(
const String& name,
const StringObject& value);
640 void setUserAccessRight(
const String& username);
646 void setDocid(
const String& docid_);
656 const MetaDataVector&
metaData()
const {
return m_metaData;}
659 const AttributeVector&
attributes()
const {
return m_attributes;}
662 const StringVector&
users()
const {
return m_users;}
665 const String&
docid()
const {
return m_docid;}
668 std::vector<Term> m_searchIndexTerms;
669 std::vector<Term> m_forwardIndexTerms;
670 std::vector<MetaData> m_metaData;
671 std::vector<Attribute> m_attributes;
672 std::vector<std::string> m_users;
678 class DocumentAnalyzeQueue;
680 class PatternMatcher;
690 #ifdef STRUS_BOOST_PYTHON
708 void addSearchIndexFeature(
710 const String& selectexpr,
713 const String& options);
715 void addSearchIndexFeature(
717 const String& selectexpr,
720 const String& options=String());
722 #ifdef STRUS_BOOST_PYTHON
723 void addSearchIndexFeature_4(
725 const String& selectexpr,
726 const FunctionObject& tokenizer_,
727 const FunctionObject& normalizers_);
729 void addSearchIndexFeature_5(
731 const String& selectexpr,
732 const FunctionObject& tokenizer_,
733 const FunctionObject& normalizers_,
734 const String& options);
745 void addForwardIndexFeature(
747 const String& selectexpr,
750 const String& options);
752 void addForwardIndexFeature(
754 const String& selectexpr,
757 const String& options=String());
759 #ifdef STRUS_BOOST_PYTHON
760 void addForwardIndexFeature_4(
762 const String& selectexpr,
763 const FunctionObject& tokenizer_,
764 const FunctionObject& normalizers_);
766 void addForwardIndexFeature_5(
768 const String& selectexpr,
769 const FunctionObject& tokenizer_,
770 const FunctionObject& normalizers_,
771 const String& options);
780 const String& fieldname,
781 const String& selectexpr,
785 #ifdef STRUS_BOOST_PYTHON
786 void defineMetaData_obj(
787 const String& fieldname,
788 const String& selectexpr,
789 const FunctionObject& tokenizer_,
790 const FunctionObject& normalizers_);
796 void defineAggregatedMetaData(
797 const String& fieldname,
800 #ifdef STRUS_BOOST_PYTHON
801 void defineAggregatedMetaData_obj(
802 const String& fieldname,
803 const FunctionObject& function_);
811 void defineAttribute(
812 const String& attribname,
813 const String& selectexpr,
817 #ifdef STRUS_BOOST_PYTHON
818 void defineAttribute_obj(
819 const String& fieldname,
820 const String& selectexpr,
821 const FunctionObject& tokenizer_,
822 const FunctionObject& normalizers_);
826 void addSearchIndexFeatureFromPatternMatch(
828 const String& patternTypeName,
830 const String& options);
832 void addSearchIndexFeatureFromPatternMatch(
834 const String& patternTypeName,
836 const String& options=String());
838 #ifdef STRUS_BOOST_PYTHON
839 void addSearchIndexFeatureFromPatternMatch_3(
841 const String& patternTypeName,
842 const FunctionObject& normalizers_);
844 void addSearchIndexFeatureFromPatternMatch_4(
846 const String& patternTypeName,
847 const FunctionObject& normalizers_,
848 const String& options);
852 void addForwardIndexFeatureFromPatternMatch(
854 const String& patternTypeName,
856 const String& options);
858 void addForwardIndexFeatureFromPatternMatch(
860 const String& patternTypeName,
862 const String& options=String());
864 #ifdef STRUS_BOOST_PYTHON
865 void addForwardIndexFeatureFromPatternMatch_3(
867 const String& patternTypeName,
868 const FunctionObject& normalizers_);
870 void addForwardIndexFeatureFromPatternMatch_4(
872 const String& patternTypeName,
873 const FunctionObject& normalizers_,
874 const String& options);
876 void defineMetaDataFromPatternMatch(
877 const String& fieldname,
878 const String& patternTypeName,
881 #ifdef STRUS_BOOST_PYTHON
882 void defineMetaDataFromPatternMatch_obj(
883 const String& fieldname,
884 const String& patternTypeName,
885 const FunctionObject& normalizers_);
887 void defineAttributeFromPatternMatch(
888 const String& attribname,
889 const String& patternTypeName,
892 #ifdef STRUS_BOOST_PYTHON
893 void defineAttributeFromPatternMatch_obj(
894 const String& fieldname,
895 const String& patternTypeName,
896 const FunctionObject& normalizers_);
903 void definePatternMatcherPostProc(
904 const String& patternTypeName,
905 const String& patternMatcherModule,
912 void definePatternMatcherPostProcFromFile(
913 const String& patternTypeName,
914 const String& patternMatcherModule,
915 const String& serializedPatternFile);
917 #ifdef STRUS_BOOST_PYTHON
918 void definePatternMatcherPostProc_expr(
919 const String& patternTypeName,
920 const String& patternMatcherModule,
921 const FunctionObject& expr_);
923 void definePatternMatcherPostProcFromFile_obj(
924 const String& patternTypeName,
925 const String& patternMatcherModule,
926 const StringObject& serializedPatternFile);
934 const String& subDocumentTypeName,
935 const String& selectexpr);
939 Document analyze(
const String& content);
946 #ifdef STRUS_BOOST_PYTHON
947 Document analyze_obj_1(
const StringObject& content);
958 DocumentAnalyzer(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd,
const String& segmentername,
const void* textproc_);
960 Reference m_errorhnd_impl;
961 Reference m_trace_impl;
962 Reference m_objbuilder_impl;
963 Reference m_analyzer_impl;
964 const void* m_textproc;
974 #ifdef STRUS_BOOST_PYTHON
977 :m_result_queue_idx(0),m_analyzerctx_queue_idx(0),m_textproc(0){}
986 void push(
const String& content);
990 void push(
const String& content,
const DocumentClass& dclass);
992 #ifdef STRUS_BOOST_PYTHON
993 void push_obj_1(
const StringObject& content);
994 void push_obj_2(
const StringObject& content,
const DocumentClass& dclass);
996 bool hasMore()
const;
1010 explicit DocumentAnalyzeQueue(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd,
const Reference& analyzer,
const void* textproc_);
1012 Reference m_errorhnd_impl;
1013 Reference m_trace_impl;
1014 Reference m_objbuilder_impl;
1015 Reference m_analyzer_impl;
1016 std::vector<Document> m_result_queue;
1017 std::size_t m_result_queue_idx;
1018 std::vector<Reference> m_analyzerctx_queue;
1019 std::size_t m_analyzerctx_queue_idx;
1020 const void* m_textproc;
1032 :m_ops(o.m_ops),m_strings(o.m_strings),m_size(o.m_size){}
1039 void pushTerm(
const String& type_,
const String& value_);
1041 #ifdef STRUS_BOOST_PYTHON
1042 void pushTerm_obj(
const String& type_,
const StringObject& value_);
1047 void pushPattern(
const String& name_);
1049 #ifdef STRUS_BOOST_PYTHON
1050 void pushPattern_obj(
const StringObject& name_);
1058 void pushExpression(
const String& opname_,
unsigned int argc_,
int range_=0,
unsigned int cardinality_=0);
1060 #ifdef STRUS_BOOST_PYTHON
1061 void pushExpression_2(
const String& opname_,
unsigned int argc)
1063 pushExpression( opname_, argc, 0, 0);
1065 void pushExpression_3(
const String& opname_,
unsigned int argc,
int range_)
1067 pushExpression( opname_, argc, range_, 0);
1069 void pushExpression_4(
const String& opname_,
unsigned int argc,
int range_,
unsigned int cardinality_)
1071 pushExpression( opname_, argc, range_, cardinality_);
1074 void definePattern(
const String& name_,
bool visible);
1077 #ifdef STRUS_BOOST_PYTHON
1078 void definePattern_obj(
const StringObject& name_,
bool visible);
1085 void attachVariable(
const String& name_);
1087 #ifdef STRUS_BOOST_PYTHON
1088 void attachVariable_obj(
const StringObject& name_);
1093 void add(
const PatternMatcher& o);
1119 Expression_opname=0x0,
1120 Expression_argc=0x1,
1121 Expression_range=0x2,
1122 Expression_cardinality=0x3,
1130 StackOp( Type type_,
int arg0_,
int arg1_=0,
int arg2_=0,
int arg3_=0)
1142 std::memset( arg, 0,
sizeof(arg));
1144 StackOp(
const StackOp& o)
1146 std::memcpy(
this, &o,
sizeof(*
this));
1149 const std::vector<StackOp>& ops()
const
1153 const std::string& strings()
const
1159 std::size_t allocid(
const String& str);
1160 #ifdef STRUS_BOOST_PYTHON
1161 std::size_t allocid_obj(
const StringObject& str);
1167 friend class PatternMatchLoader;
1168 std::vector<StackOp> m_ops;
1169 std::string m_strings;
1182 #ifdef STRUS_BOOST_PYTHON
1196 void addSearchIndexElement(
1197 const String& featureType,
1198 const String& fieldType,
1201 #ifdef STRUS_BOOST_PYTHON
1202 void addSearchIndexElement_obj(
1203 const String& featureType,
1204 const String& fieldType,
1205 const FunctionObject& tokenizer_,
1206 const FunctionObject& normalizers_);
1208 void addSearchIndexElementFromPatternMatch(
1213 const std::string& type,
1214 const std::string& patternTypeName,
1217 #ifdef STRUS_BOOST_PYTHON
1218 void addSearchIndexElementFromPatternMatch_obj(
1220 const String& patternTypeName,
1221 const FunctionObject& normalizers_);
1229 void addPatternLexem(
1230 const std::string& termtype,
1231 const std::string& fieldtype,
1234 #ifdef STRUS_BOOST_PYTHON
1235 void addPatternLexem_obj(
1236 const String& featureType,
1237 const String& fieldType,
1238 const FunctionObject& tokenizer_,
1239 const FunctionObject& normalizers_);
1246 void definePatternMatcherPostProc(
1247 const String& patternTypeName,
1248 const String& patternMatcherModule,
1255 void definePatternMatcherPostProcFromFile(
1256 const String& patternTypeName,
1257 const String& patternMatcherModule,
1258 const String& serializedPatternFile);
1260 #ifdef STRUS_BOOST_PYTHON
1261 void definePatternMatcherPostProc_expr(
1262 const String& patternTypeName,
1263 const String& patternMatcherModule,
1264 const FunctionObject& expr_);
1266 void definePatternMatcherPostProcFromFile_obj(
1267 const String& patternTypeName,
1268 const String& patternMatcherModule,
1269 const StringObject& serializedPatternFile);
1276 TermVector analyzeField(
1277 const String& fieldType,
1278 const String& fieldContent);
1280 #ifdef STRUS_BOOST_PYTHON
1281 TermVector analyzeField_obj(
1282 const String& fieldType,
1283 const StringObject& fieldContent);
1293 QueryAnalyzer(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd);
1295 Reference m_errorhnd_impl;
1296 Reference m_trace_impl;
1297 Reference m_objbuilder_impl;
1298 Reference m_analyzer_impl;
1309 :
Term(type_,value_,position_, length_),m_field(field_){}
1312 :
Term(o),m_field(o.m_field){}
1315 :
Term(),m_field(0){}
1318 unsigned int field()
const {
return m_field;}
1320 const String&
type()
const {
return Term::type();}
1322 const String&
value()
const {
return Term::value();}
1323 #if defined STRUS_BOOST_PYTHON || defined DOXYGEN_PYTHON
1326 Index position()
const {
return Term::position();}
1329 #ifdef STRUS_BOOST_PYTHON
1330 bool operator==(
const QueryTerm& o)
const {
return Term::operator==( o);}
1331 bool operator!=(
const QueryTerm& o)
const {
return Term::operator!=( o);}
1337 #ifdef STRUS_BOOST_PYTHON
1338 typedef std::vector<QueryTerm> QueryTermVector;
1347 #ifdef STRUS_BOOST_PYTHON
1361 unsigned int fieldNo,
1362 const String& fieldType,
1363 const String& fieldContent);
1364 #ifdef STRUS_BOOST_PYTHON
1365 void putField_obj(
unsigned int fieldNo,
const String& fieldType,
const StringObject& fieldContent);
1370 QueryTermVector analyze();
1375 explicit QueryAnalyzeContext(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd,
const Reference& analyzer);
1377 Reference m_errorhnd_impl;
1378 Reference m_trace_impl;
1379 Reference m_objbuilder_impl;
1380 Reference m_analyzer_impl;
1381 Reference m_analyzer_ctx_impl;
1396 #ifdef STRUS_BOOST_PYTHON
1408 Index nofDocumentsInserted()
const;
1431 StorageClient(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd_,
const String& config);
1435 Reference m_errorhnd_impl;
1436 Reference m_trace_impl;
1437 Reference m_objbuilder_impl;
1438 Reference m_storage_impl;
1447 #ifdef STRUS_BOOST_PYTHON
1458 void insertDocument(
const String& docid,
const Document& doc);
1463 void deleteDocument(
const String& docid);
1464 #ifdef STRUS_BOOST_PYTHON
1465 void deleteDocument_obj(
const StringObject& docid);
1471 void deleteUserAccessRights(
const String& username);
1472 #ifdef STRUS_BOOST_PYTHON
1473 void deleteUserAccessRights_obj(
const StringObject& username);
1484 StorageTransaction(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd_,
const Reference& storage_);
1488 Reference m_errorhnd_impl;
1489 Reference m_trace_impl;
1490 Reference m_objbuilder_impl;
1491 Reference m_storage_impl;
1492 Reference m_transaction_impl;
1505 :m_type(type_),m_value(value_),m_increment(increment_){}
1508 :m_type(o.m_type),m_value(o.m_value),m_increment(o.m_increment){}
1514 const String&
type()
const {
return m_type;}
1516 const String&
value()
const {
return m_value;}
1517 #if defined STRUS_BOOST_PYTHON || defined DOXYGEN_PYTHON
1518 WString ucvalue()
const;
1520 int increment()
const {
return m_increment;}
1523 #ifdef STRUS_BOOST_PYTHON
1524 bool operator==(
const DocumentFrequencyChange& o)
const
1526 return m_type == o.m_type && m_value == o.m_value && m_increment == o.m_increment;
1528 bool operator!=(
const DocumentFrequencyChange& o)
const
1530 return m_type != o.m_type || m_value != o.m_value || m_increment != o.m_increment;
1536 std::string m_value;
1539 #ifdef STRUS_BOOST_PYTHON
1540 typedef std::vector<DocumentFrequencyChange> DocumentFrequencyChangeVector;
1548 #ifdef STRUS_BOOST_PYTHON
1554 :m_nofDocumentsInsertedChange(o.m_nofDocumentsInsertedChange)
1555 ,m_documentFrequencyChangeList(o.m_documentFrequencyChangeList){}
1559 :m_nofDocumentsInsertedChange(nofdocs)
1560 ,m_documentFrequencyChangeList(dfchglist){}
1566 return m_nofDocumentsInsertedChange;
1573 return m_documentFrequencyChangeList;
1577 int m_nofDocumentsInsertedChange;
1578 std::vector<DocumentFrequencyChange> m_documentFrequencyChangeList;
1586 #ifdef STRUS_BOOST_PYTHON
1599 StatisticsIterator(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd_,
const Reference& storage_,
const Reference& iter_);
1602 Reference m_errorhnd_impl;
1603 Reference m_trace_impl;
1604 Reference m_objbuilder_impl;
1605 Reference m_storage_impl;
1606 Reference m_iter_impl;
1614 #ifdef STRUS_BOOST_PYTHON
1622 #ifdef STRUS_BOOST_PYTHON
1632 StatisticsProcessor(
const Reference& objbuilder_,
const Reference& trace_,
const std::string& name_,
const Reference& errorhnd_);
1635 Reference m_errorhnd_impl;
1636 Reference m_trace_impl;
1637 Reference m_objbuilder_impl;
1638 const void* m_statsproc;
1648 :m_index(0),m_weight(0.0){}
1651 :m_index(index_),m_weight(weight_){}
1654 :m_index(o.m_index),m_weight(o.m_weight){}
1662 #ifdef STRUS_BOOST_PYTHON
1663 bool operator==(
const VecRank& o)
const
1665 if (m_index != o.m_index)
return false;
1666 double ww = (m_weight - o.m_weight);
1667 return (ww < 0.0)?(-ww < std::numeric_limits<double>::epsilon()):(ww < std::numeric_limits<double>::epsilon());
1669 bool operator!=(
const VecRank& o)
const
1671 return !operator==( o);
1679 #ifdef STRUS_BOOST_PYTHON
1680 typedef std::vector<VecRank> VecRankVector;
1686 #ifdef STRUS_BOOST_PYTHON
1700 VecRankVector findSimilar(
const FloatVector& vec,
unsigned int maxNofResults)
const;
1701 #ifdef STRUS_BOOST_PYTHON
1702 VecRankVector findSimilar_obj(
const FunctionObject& vec,
unsigned int maxNofResults)
const;
1710 VecRankVector findSimilarFromSelection(
const IndexVector& featidxlist,
const FloatVector& vec,
unsigned int maxNofResults)
const;
1711 #ifdef STRUS_BOOST_PYTHON
1712 VecRankVector findSimilarFromSelection_obj(
const FunctionObject& featidxlist,
const FunctionObject& vec,
unsigned int maxNofResults)
const;
1722 Reference m_errorhnd_impl;
1723 Reference m_searcher_impl;
1724 Reference m_trace_impl;
1735 #ifdef STRUS_BOOST_PYTHON
1756 StringVector conceptClassNames()
const;
1762 IndexVector conceptFeatures(
const String& conceptClass,
const Index& conceptid)
const;
1767 unsigned int nofConcepts(
const String& conceptClass)
const;
1773 IndexVector featureConcepts(
const String& conceptClass,
const Index& index)
const;
1778 FloatVector featureVector(
const Index& index)
const;
1783 String featureName(
const Index& index)
const;
1788 Index featureIndex(
const String& name)
const;
1792 unsigned int nofFeatures()
const;
1796 String config()
const;
1803 VectorStorageClient(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd_,
const String& config);
1805 Reference m_errorhnd_impl;
1806 Reference m_trace_impl;
1807 Reference m_objbuilder_impl;
1808 Reference m_vector_storage_impl;
1809 std::string m_config;
1815 #ifdef STRUS_BOOST_PYTHON
1824 void addFeature(
const String& name,
const FloatVector& vec);
1825 #ifdef STRUS_BOOST_PYTHON
1826 void addFeature_obj(
const StringObject& name,
const FunctionObject& vec);
1828 void defineFeatureConceptRelation(
const String& relationTypeName,
const Index& featidx,
const Index& conidx);
1829 #ifdef STRUS_BOOST_PYTHON
1830 void defineFeatureConceptRelation_obj(
const StringObject& relationTypeName,
const Index& featidx,
const Index& conidx);
1842 VectorStorageTransaction(
const Reference& objbuilder,
const Reference& storage,
const Reference& trace,
const Reference& errorhnd_,
const String& config);
1844 Reference m_errorhnd_impl;
1845 Reference m_trace_impl;
1846 Reference m_objbuilder_impl;
1847 Reference m_vector_storage_impl;
1848 Reference m_vector_transaction_impl;
1860 :m_variables(o.m_variables){}
1867 m_variables[ name] = value;
1873 std::map<std::string,double> m_variables;
1884 :m_parameters(o.m_parameters),m_features(o.m_features){}
1886 #ifndef DOXYGEN_JAVA
1887 void defineParameter(
const String& name,
const Variant& value)
1892 m_parameters[ name] = value;
1895 void defineParameter(
const String& name,
const char* value)
1900 m_parameters[ name] = Variant(value);
1908 m_parameters[ name] = value;
1916 m_parameters[ name] = value;
1924 m_parameters[ name] = value;
1932 m_features[ sumtype] = set;
1940 m_resultnamemap[ origname] = newname;
1945 std::map<std::string,Variant> m_parameters;
1946 std::map<std::string,std::string> m_features;
1947 std::map<std::string,std::string> m_resultnamemap;
1958 :m_parameters(o.m_parameters){}
1960 #ifndef DOXYGEN_JAVA
1961 void defineParameter(
const String& name,
const Variant& value)
1966 m_parameters[ name] = value;
1969 void defineParameter(
const String& name,
int value)
1974 m_parameters[ name] = value;
1982 m_parameters[ name] = value;
1990 m_parameters[ name] = value;
1998 m_parameters[ name] =
Variant(value);
2000 #if !defined SWIGJAVA && !defined SWIGPHP
2001 void defineParameter(
const String& name,
const String& value)
2006 m_parameters[ name] =
Variant(value);
2015 m_features[ sumtype] = set;
2020 std::map<std::string,Variant> m_parameters;
2021 std::map<std::string,std::string> m_features;
2031 #ifdef STRUS_BOOST_PYTHON
2046 const String& type_,
2047 const String& value_);
2051 void addSelectionFeature(
const String& set_);
2055 void addRestrictionFeature(
const String& set_);
2059 void addExclusionFeature(
const String& set_);
2068 #ifdef STRUS_BOOST_PYTHON
2069 void addSummarizer_obj(
2071 const FunctionObject& config_);
2077 void addWeightingFunction(
2081 #ifdef STRUS_BOOST_PYTHON
2082 void addWeightingFunction_obj(
2084 const FunctionObject& config_);
2086 void addWeightingFormula(
2089 const String& source,
2091 #ifdef STRUS_BOOST_PYTHON
2092 void addWeightingFormula_obj(
2093 const StringObject& source,
2094 const FunctionObject& defaultParameter_);
2104 QueryEval(
const Reference& objbuilder,
const Reference& trace,
const Reference& errorhnd);
2107 Reference m_errorhnd_impl;
2108 Reference m_trace_impl;
2109 Reference m_objbuilder_impl;
2110 Reference m_queryeval_impl;
2111 const void* m_queryproc;
2121 :m_weight(0.0),m_index(-1){}
2123 SummaryElement(
const String& name_,
const String& value_,
double weight_,
int index_)
2124 :m_name(name_),m_value(value_),m_weight(weight_),m_index(index_){}
2127 :m_name(o.m_name),m_value(o.m_value),m_weight(o.m_weight),m_index(o.m_index){}
2130 const String&
name()
const {
return m_name;}
2132 const String&
value()
const {
return m_value;}
2138 #if defined STRUS_BOOST_PYTHON || defined DOXYGEN_PYTHON
2139 WString ucvalue()
const;
2143 if (m_name != o.m_name || m_value != o.m_value || m_index != o.m_index)
return false;
2144 double ww = m_weight - o.m_weight;
2145 return (ww < 0.0)?(-ww<std::numeric_limits<double>::epsilon()):(ww<std::numeric_limits<double>::epsilon());
2149 return !operator==(o);
2155 std::string m_value;
2159 #ifdef STRUS_BOOST_PYTHON
2160 typedef std::vector<SummaryElement> SummaryElementVector;
2170 :m_docno(0),m_weight(0.0){}
2172 Rank(
Index docno_,
double weight_,
const SummaryElementVector& summaryElements_)
2173 :m_docno(docno_),m_weight(weight_),m_summaryElements(summaryElements_){}
2176 :m_docno(o.m_docno),m_weight(o.m_weight),m_summaryElements(o.m_summaryElements){}
2187 #ifdef STRUS_BOOST_PYTHON
2188 bool operator==(
const Rank& o)
const
2190 if (m_docno != o.m_docno)
return false;
2191 double ww = (m_weight - o.m_weight);
2192 return (ww < 0.0)?(-ww < std::numeric_limits<double>::epsilon()):(ww < std::numeric_limits<double>::epsilon());
2194 bool operator!=(
const Rank& o)
const
2196 return !operator==( o);
2204 std::vector<SummaryElement> m_summaryElements;
2206 #ifdef STRUS_BOOST_PYTHON
2207 typedef std::vector<Rank> RankVector;
2216 :m_ops(o.m_ops),m_strings(o.m_strings),m_size(o.m_size){}
2224 void pushTerm(
const String& type_,
const String& value_,
const Index& length_);
2229 void pushDocField(
const String& metadata_start_,
const String& metadata_end_);
2231 #ifdef STRUS_BOOST_PYTHON
2232 void pushTerm_obj(
const String& type_,
const StringObject& value_,
const Index& length_);
2234 void pushExpression(
const String& opname_,
unsigned int argc_,
int range_=0,
unsigned int cardinality_=0);
2241 #ifdef STRUS_BOOST_PYTHON
2242 void pushExpression_2(
const String& opname_,
unsigned int argc)
2244 pushExpression( opname_, argc, 0, 0);
2246 void pushExpression_3(
const String& opname_,
unsigned int argc,
int range_)
2248 pushExpression( opname_, argc, range_, 0);
2250 void pushExpression_4(
const String& opname_,
unsigned int argc,
int range_,
unsigned int cardinality_)
2252 pushExpression( opname_, argc, range_, cardinality_);
2260 void attachVariable(
const String& name_);
2261 #ifdef STRUS_BOOST_PYTHON
2262 void attachVariable_obj(
const StringObject& name_);
2267 void add(
const QueryExpression& o);
2295 Expression_opname=0x0,
2296 Expression_argc=0x1,
2297 Expression_range=0x2,
2298 Expression_cardinality=0x3,
2304 StackOp( Type type_,
int arg0_,
int arg1_=0,
int arg2_=0,
int arg3_=0)
2316 std::memset( arg, 0,
sizeof(arg));
2318 StackOp(
const StackOp& o)
2320 std::memcpy(
this, &o,
sizeof(*
this));
2323 std::size_t allocid(
const String& str);
2324 #ifdef STRUS_BOOST_PYTHON
2325 std::size_t allocid_obj(
const StringObject& str);
2329 std::vector<StackOp> m_ops;
2330 std::string m_strings;
2367 :m_nofDocumentsInserted(-1){}
2370 :m_nofDocumentsInserted(nofDocumentsInserted_){}
2373 :m_nofDocumentsInserted(o.m_nofDocumentsInserted){}
2391 :m_evaluationPass(0),m_nofDocumentsRanked(0),m_nofDocumentsVisited(0){}
2401 const RankVector&
ranks()
const {
return m_ranks;}
2405 QueryResult(
unsigned int evaluationPass_,
unsigned int nofDocumentsRanked_,
unsigned int nofDocumentsVisited_)
2406 :m_evaluationPass(evaluationPass_),m_nofDocumentsRanked(nofDocumentsRanked_),m_nofDocumentsVisited(nofDocumentsVisited_){}
2409 unsigned int m_evaluationPass;
2410 unsigned int m_nofDocumentsRanked;
2411 unsigned int m_nofDocumentsVisited;
2419 #ifdef STRUS_BOOST_PYTHON
2435 void defineFeature(
const String& set_,
const QueryExpression& expr_,
double weight_);
2437 void defineFeature(
const String& set_,
const QueryExpression& expr_,
double weight_=1.0);
2439 #ifdef STRUS_BOOST_PYTHON
2440 void defineFeature_2(
const String& set_,
const QueryExpression& expr_)
2442 defineFeature( set_, expr_, 1.0);
2445 void defineFeature_3(
const String& set_,
const QueryExpression& expr_,
double weight_)
2447 defineFeature( set_, expr_, weight_);
2450 void defineFeature_expr_2(
const String& set_,
const FunctionObject& expr_);
2451 void defineFeature_expr_3(
const String& set_,
const FunctionObject& expr_,
double weight_);
2458 void defineDocFieldFeature(
const String& set_,
const String& metadataStart,
const String& metadataEnd);
2460 #ifndef DOXYGEN_JAVA
2461 void addMetaDataRestrictionCondition(
2467 const char* compareOp,
const String& name,
2468 const Variant& value,
bool newGroup);
2470 void addMetaDataRestrictionCondition(
2476 const char* compareOp,
const String& name,
2477 double value,
bool newGroup);
2484 void addMetaDataRestrictionCondition(
2485 const char* compareOp,
const String& name,
2486 unsigned int value,
bool newGroup);
2493 void addMetaDataRestrictionCondition(
2494 const char* compareOp,
const String& name,
2495 int value,
bool newGroup);
2497 #ifdef STRUS_BOOST_PYTHON
2498 void addMetaDataRestrictionCondition_double(
2499 const char* compareOp,
const String& name,
2500 double value,
bool newGroup)
2502 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2505 void addMetaDataRestrictionCondition_uint(
2506 const char* compareOp,
const String& name,
2507 unsigned int value,
bool newGroup)
2509 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2512 void addMetaDataRestrictionCondition_int(
2513 const char* compareOp,
const String& name,
2514 int value,
bool newGroup)
2516 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2519 void defineTermStatistics(
const String& type_,
const String& value_,
const TermStatistics& stats_);
2527 void defineGlobalStatistics(
const GlobalStatistics& stats_);
2529 #ifdef STRUS_BOOST_PYTHON
2530 void defineTermStatistics_obj_struct(
const String& type_,
const StringObject& value_,
const FunctionObject& stats_);
2531 void defineGlobalStatistics_struct(
const FunctionObject& stats_);
2536 void addDocumentEvaluationSet(
const IndexVector& docnolist_);
2537 #ifdef STRUS_BOOST_PYTHON
2538 void addDocumentEvaluationSet_struct(
const FunctionObject& docnolist_);
2543 void setMaxNofRanks(
unsigned int maxNofRanks_);
2547 void setMinRank(
unsigned int minRank_);
2552 void addUserName(
const String& username_);
2554 #ifdef STRUS_BOOST_PYTHON
2555 void addUserName_obj(
const StringObject& username_);
2557 void setWeightingVariables(
2560 const FunctionVariableConfig& parameter);
2561 #ifdef STRUS_BOOST_PYTHON
2562 void setWeightingVariables_obj(
2563 const FunctionObject& parameter_);
2568 QueryResult evaluate()
const;
2572 String tostring()
const;
2576 Query(
const Reference& objbuilder_impl_,
const Reference& trace_impl_,
const Reference& errorhnd_,
const Reference& storage_impl_,
const Reference& queryeval_impl_,
const Reference& query_impl_,
const void* queryproc_)
2577 :m_errorhnd_impl(errorhnd_),m_trace_impl(trace_impl_),m_objbuilder_impl(objbuilder_impl_),m_storage_impl(storage_impl_),m_queryeval_impl(queryeval_impl_),m_query_impl(query_impl_),m_queryproc(queryproc_)
2580 Reference m_errorhnd_impl;
2581 Reference m_trace_impl;
2582 Reference m_objbuilder_impl;
2583 Reference m_storage_impl;
2584 Reference m_queryeval_impl;
2585 Reference m_query_impl;
2586 const void* m_queryproc;
2593 #ifdef STRUS_BOOST_PYTHON
2602 #ifndef DOXYGEN_JAVA
2603 void addMetaDataRestrictionCondition(
2610 const char* compareOp,
const String& name,
2611 const Variant& value,
bool newGroup);
2613 void addMetaDataRestrictionCondition(
2620 const char* compareOp,
const String& name,
2621 double value,
bool newGroup);
2629 void addMetaDataRestrictionCondition(
2630 const char* compareOp,
const String& name,
2631 unsigned int value,
bool newGroup);
2639 void addMetaDataRestrictionCondition(
2640 const char* compareOp,
const String& name,
2641 int value,
bool newGroup);
2643 #ifdef STRUS_BOOST_PYTHON
2644 void addMetaDataRestrictionCondition_double(
2645 const char* compareOp,
const String& name,
2646 double value,
bool newGroup)
2648 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2651 void addMetaDataRestrictionCondition_uint(
2652 const char* compareOp,
const String& name,
2653 unsigned int value,
bool newGroup)
2655 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2658 void addMetaDataRestrictionCondition_int(
2659 const char* compareOp,
const String& name,
2660 int value,
bool newGroup)
2662 addMetaDataRestrictionCondition( compareOp, name, value, newGroup);
2672 String attribute(
const String& name);
2677 const Reference& objbuilder_impl_,
2678 const Reference& trace_impl_,
2679 const Reference& storage_impl_,
2680 const Reference& errorhnd_);
2683 Reference m_errorhnd_impl;
2684 Reference m_trace_impl;
2685 Reference m_objbuilder_impl;
2686 Reference m_storage_impl;
2687 Reference m_restriction_impl;
2688 Reference m_postingitr_impl;
2689 Reference m_attributereader_impl;
2708 explicit Context(
unsigned int maxNofThreads);
2712 explicit Context(
unsigned int maxNofThreads,
const String& tracecfg);
2716 explicit Context(
const String& connectionstring);
2721 Context(
const String& connectionstring,
unsigned int maxNofThreads);
2729 void checkErrors()
const;
2734 void loadModule(
const String& name_);
2739 void addModulePath(
const String& paths_);
2741 #ifdef STRUS_BOOST_PYTHON
2742 void addModulePath_obj(
const StringObject& paths_);
2748 void addResourcePath(
const String& paths_);
2750 #ifdef STRUS_BOOST_PYTHON
2751 void addResourcePath_obj(
const StringObject& paths_);
2765 #ifdef STRUS_BOOST_PYTHON
2767 StorageClient createStorageClient_obj(
const StringObject& config_);
2776 #ifdef STRUS_BOOST_PYTHON
2784 void createStorage(
const String& config_);
2786 #ifdef STRUS_BOOST_PYTHON
2787 void createStorage_obj(
const StringObject& config_);
2793 void createVectorStorage(
const String& config_);
2795 #ifdef STRUS_BOOST_PYTHON
2796 void createVectorStorage_obj(
const StringObject& config_);
2798 void destroyStorage(
const String& config_);
2804 #ifdef STRUS_BOOST_PYTHON
2805 void destroyStorage_obj(
const StringObject& config_);
2812 #ifdef STRUS_BOOST_PYTHON
2813 DocumentClass detectDocumentClass_obj(
const StringObject& content);
2819 #ifdef STRUS_BOOST_PYTHON
2820 DocumentAnalyzer createDocumentAnalyzer_obj(
const StringObject& segmentername_);
2835 void initStorageObjBuilder();
2836 void initAnalyzerObjBuilder();
2839 Reference m_errorhnd_impl;
2840 Reference m_moduleloader_impl;
2841 Reference m_rpc_impl;
2842 Reference m_trace_impl;
2843 Reference m_storage_objbuilder_impl;
2844 Reference m_analyzer_objbuilder_impl;
2845 const void* m_textproc;
2849 #if defined DOXYGEN_JAVA
2851 #elif defined DOXYGEN_PYTHON
Object epresenting a configuration of a tokenizer as single string naming a tokenizer without argumen...
Definition: bindingObjects.hpp:109
QueryTerm(const Index &field_, const String &type_, const String &value_, const Index &position_, const Index &length_)
Constructor.
Definition: bindingObjects.hpp:1308
void defineFeature(const String &sumtype, const String &set)
Define a summarizer feature.
Definition: bindingObjects.hpp:1930
SummarizerConfig(const SummarizerConfig &o)
Copy constructor.
Definition: bindingObjects.hpp:1883
Index length() const
Get the term length.
Definition: bindingObjects.hpp:420
Index index() const
Get the feature number ( >= 0) from this.
Definition: bindingObjects.hpp:1657
bool operator==(const SummaryElement &o) const
Definition: bindingObjects.hpp:2141
Object representing a configuration of an aggregator function as single string naming an aggregator w...
Definition: bindingObjects.hpp:211
Rank(const Rank &o)
Copy constructor.
Definition: bindingObjects.hpp:2175
Query analyzer term with info about the field it originated from.
Definition: bindingObjects.hpp:1304
Object holding the global context of the strus information retrieval engine.
Definition: bindingObjects.hpp:2701
VecRank()
Constructor.
Definition: bindingObjects.hpp:1647
double weight() const
Get the weight of the vector rank.
Definition: bindingObjects.hpp:1659
std::size_t size() const
Get the number of items (sub expressions) on the stack as result of this expression.
Definition: bindingObjects.hpp:1097
Weighted vector (result of a query vector storage search)
Definition: bindingObjects.hpp:1643
const MetaDataVector & metaData() const
Get the list of meta data of the document.
Definition: bindingObjects.hpp:656
GlobalCounter df() const
Get the global document frequency.
Definition: bindingObjects.hpp:2352
void defineParameter(const String &name, int value)
Define a summarizer parameter.
Definition: bindingObjects.hpp:1906
SummarizerConfig()
Constructor.
Definition: bindingObjects.hpp:1881
GlobalCounter nofdocs() const
Get the global total number of documents in the collection.
Definition: bindingObjects.hpp:2376
Attribute(const Attribute &o)
Constructor.
Definition: bindingObjects.hpp:495
SummaryElement(const String &name_, const String &value_, double weight_, int index_)
Constructor.
Definition: bindingObjects.hpp:2123
const String & docid() const
Get the document identifier (docid) of the document.
Definition: bindingObjects.hpp:665
QueryExpression(const QueryExpression &o)
Definition: bindingObjects.hpp:2215
DocumentClass(const String &mimeType_)
Constructor.
Definition: bindingObjects.hpp:536
Iterator on messages with storage statistics.
Definition: bindingObjects.hpp:1583
Object representing a string or a numeric value of the binding language.
Definition: bindingObjects.hpp:285
GlobalStatistics(const GlobalStatistics &o)
Copy constructor.
Definition: bindingObjects.hpp:2372
Rank(Index docno_, double weight_, const SummaryElementVector &summaryElements_)
Constructor.
Definition: bindingObjects.hpp:2172
const String & value() const
Get the term value.
Definition: bindingObjects.hpp:1322
VecRank(Index index_, double weight_)
Constructor.
Definition: bindingObjects.hpp:1650
Term()
Default constructor.
Definition: bindingObjects.hpp:407
const String & type() const
Get the term type name.
Definition: bindingObjects.hpp:411
double weight() const
Get the weight of the rank.
Definition: bindingObjects.hpp:2181
Object representing a sequence of query operations to get the set of postings (d,p) of an atomic term...
Definition: bindingObjects.hpp:2212
~QueryAnalyzeContext()
Destructor.
Definition: bindingObjects.hpp:1354
void setMimeType(const String &mimeType_)
Set the MIME type of the document class.
Definition: bindingObjects.hpp:556
const SummaryElementVector & summaryElements() const
Get the summary elements.
Definition: bindingObjects.hpp:2185
const String & mimeType() const
Get the MIME type of the document class.
Definition: bindingObjects.hpp:566
Object representing a client connection to a vector storage.
Definition: bindingObjects.hpp:1732
WString ucvalue() const
Definition: bindingObjects.hpp:1324
std::size_t size() const
Get the number of items (sub expressions) on the stack as result of this expression.
Definition: bindingObjects.hpp:2271
Translation to update a storage with statistics messages.
Definition: bindingObjects.hpp:1611
unsigned int field() const
Get the term position.
Definition: bindingObjects.hpp:1318
~QueryEval()
Destructor.
Definition: bindingObjects.hpp:2038
Query evaluation program object representing an information retrieval scheme for documents in a stora...
Definition: bindingObjects.hpp:2028
Configuration describing the values passed to a weighting function.
Definition: bindingObjects.hpp:1951
void defineParameter(const String &name, const char *value)
Define a parameter used for weighting.
Definition: bindingObjects.hpp:1996
Implements browsing the documents of a storage without weighting query, just with a restriction on me...
Definition: bindingObjects.hpp:2590
TermStatistics()
Constructor.
Definition: bindingObjects.hpp:2341
TermStatistics(GlobalCounter df_)
Constructor.
Definition: bindingObjects.hpp:2344
void defineParameter(const String &name, unsigned int value)
Define a parameter used for weighting.
Definition: bindingObjects.hpp:1980
void defineParameter(const String &name, double value)
Define a summarizer parameter.
Definition: bindingObjects.hpp:1922
QueryResult()
Default constructor.
Definition: bindingObjects.hpp:2390
const String & value() const
Get the term value.
Definition: bindingObjects.hpp:413
void setEncoding(const String &encoding_)
Set the character set encoding of the document class.
Definition: bindingObjects.hpp:562
bool valid() const
Check if this document class is valid.
Definition: bindingObjects.hpp:552
QueryTerm()
Default constructor.
Definition: bindingObjects.hpp:1314
~DocumentAnalyzer()
Destructor.
Definition: bindingObjects.hpp:698
Object representing a pattern match program.
Definition: bindingObjects.hpp:1028
FunctionVariableConfig()
Default constructor.
Definition: bindingObjects.hpp:1857
unsigned int nofDocumentsRanked() const
Get the total number of matches that were ranked (after applying all query restrictions) ...
Definition: bindingObjects.hpp:2396
Definition: bindingObjects.hpp:1683
const String & type() const
Get the term type name.
Definition: bindingObjects.hpp:1320
DocumentClass(const DocumentClass &o)
Copy constructor.
Definition: bindingObjects.hpp:548
bool operator!=(const SummaryElement &o) const
Definition: bindingObjects.hpp:2147
~DocumentAnalyzeQueue()
Destructor.
Definition: bindingObjects.hpp:982
Configuration describing the values passed to a summarizer function.
Definition: bindingObjects.hpp:1877
Structure describing the document frequency change of one term in the collection. ...
Definition: bindingObjects.hpp:1497
long GlobalCounter
Definition: bindingObjects.hpp:56
DocumentFrequencyChange()
Default constructor.
Definition: bindingObjects.hpp:1510
Index docno() const
Get the internal document nuber used.
Definition: bindingObjects.hpp:2179
void defineParameter(const String &name, unsigned int value)
Define a summarizer parameter.
Definition: bindingObjects.hpp:1914
Defines a description of the properties of a document content processed by the analyzer.
Definition: bindingObjects.hpp:530
PatternMatcher()
Definition: bindingObjects.hpp:1033
const String & value() const
Get the type value of this attribute.
Definition: bindingObjects.hpp:504
Attribute()
Constructor.
Definition: bindingObjects.hpp:498
Document()
Default constructor.
Definition: bindingObjects.hpp:587
Analyzer object representing a set of function for transforming a field, the smallest unit in any que...
Definition: bindingObjects.hpp:1179
~Query()
Destructor.
Definition: bindingObjects.hpp:2426
Object representing a transaction of the storage.
Definition: bindingObjects.hpp:1444
Object representing a client connection to the storage.
Definition: bindingObjects.hpp:1393
Term(const String &type_, const String &value_, const Index &position_, const Index &length_)
Constructor.
Definition: bindingObjects.hpp:401
const StringVector & users() const
Get the list of users that are allowed to access the document.
Definition: bindingObjects.hpp:662
~QueryAnalyzer()
Destructor.
Definition: bindingObjects.hpp:1189
PatternMatcher(const PatternMatcher &o)
Definition: bindingObjects.hpp:1031
~VectorStorageSearcher()
Destructor.
Definition: bindingObjects.hpp:1694
Configuration describing a scalar function variable value.
Definition: bindingObjects.hpp:1853
TermStatistics(const TermStatistics &o)
Copy constructor.
Definition: bindingObjects.hpp:2347
DocumentClass(const String &mimeType_, const String &encoding_, const String &scheme_)
Constructor.
Definition: bindingObjects.hpp:543
const String & type() const
Get the term type name.
Definition: bindingObjects.hpp:1514
void set_nofdocs(GlobalCounter nofdocs_)
Set the global total number of documents in the collection for a query evaluation.
Definition: bindingObjects.hpp:2379
const String & name() const
Get the name of the summary element.
Definition: bindingObjects.hpp:2130
VecRank(const VecRank &o)
Copy constructor.
Definition: bindingObjects.hpp:1653
int index() const
Get the index (grouping) of the summary element if defined or -1.
Definition: bindingObjects.hpp:2136
Attribute of a query evaluation result element.
Definition: bindingObjects.hpp:2116
QueryExpression()
Definition: bindingObjects.hpp:2217
~VectorStorageTransaction()
Definition: bindingObjects.hpp:1822
const TermVector & searchIndexTerms() const
Get the list of search terms of the document.
Definition: bindingObjects.hpp:650
const String & encoding() const
Get the character set encoding of the document class.
Definition: bindingObjects.hpp:572
SummaryElement()
Constructor.
Definition: bindingObjects.hpp:2120
int nofDocumentsInsertedChange() const
Return the change of number of documents inserted.
Definition: bindingObjects.hpp:1564
double weight() const
Get the weight of the summary element.
Definition: bindingObjects.hpp:2134
One typed term occurrence in a document or a query.
Definition: bindingObjects.hpp:397
const String & value() const
Get the value of the summary element.
Definition: bindingObjects.hpp:2132
~VectorStorageClient()
Destructor.
Definition: bindingObjects.hpp:1743
~StorageClient()
Destructor.
Definition: bindingObjects.hpp:1404
DocumentClass()
Default constructor.
Definition: bindingObjects.hpp:534
Structure holding the statistics of a term to be used in a query.
Definition: bindingObjects.hpp:2337
DocumentClass(const String &mimeType_, const String &encoding_)
Constructor.
Definition: bindingObjects.hpp:539
Analyzer object representing a program for segmenting, tokenizing and normalizing a document into ato...
Definition: bindingObjects.hpp:687
DocumentFrequencyChange(const String &type_, const String &value_, int increment_)
Constructor.
Definition: bindingObjects.hpp:1504
WeightingConfig(const WeightingConfig &o)
Copy constructor.
Definition: bindingObjects.hpp:1957
Query analyzer context for analysing a multipart query.
Definition: bindingObjects.hpp:1344
const std::vector< DocumentFrequencyChange > & documentFrequencyChangeList() const
Return the list of document frequency changes.
Definition: bindingObjects.hpp:1571
const RankVector & ranks() const
Get the list of result elements.
Definition: bindingObjects.hpp:2401
const String & scheme() const
Get the scheme identifier of the document class.
Definition: bindingObjects.hpp:569
Definition: bindingObjects.hpp:1812
const TermVector & forwardIndexTerms() const
Get the list of forward terms of the document.
Definition: bindingObjects.hpp:653
Query program object representing a retrieval method for documents in a storage.
Definition: bindingObjects.hpp:2416
~DocumentBrowser()
Destructor.
Definition: bindingObjects.hpp:2600
Global document statistics, if passed down with the query.
Definition: bindingObjects.hpp:2363
GlobalStatistics()
Default constructor.
Definition: bindingObjects.hpp:2366
DocumentFrequencyChange(const DocumentFrequencyChange &o)
Copy constructor.
Definition: bindingObjects.hpp:1507
Data object that describes a single property of a document that is not subject of retrieval...
Definition: bindingObjects.hpp:488
FunctionVariableConfig(const FunctionVariableConfig &o)
Copy constructor.
Definition: bindingObjects.hpp:1859
~Context()
Destructor.
Definition: bindingObjects.hpp:2725
Term(const Term &o)
Copy constructor.
Definition: bindingObjects.hpp:404
Weighted document reference with attributes (result of a query evaluation)
Definition: bindingObjects.hpp:2165
Rank()
Constructor.
Definition: bindingObjects.hpp:2169
GlobalStatistics(GlobalCounter nofDocumentsInserted_)
Constructor.
Definition: bindingObjects.hpp:2369
const String & name() const
Get the unique type name of this attribute.
Definition: bindingObjects.hpp:502
WeightingConfig()
Default constructor.
Definition: bindingObjects.hpp:1955
const String & value() const
Get the term value.
Definition: bindingObjects.hpp:1516
StatisticsMessage(const std::vector< DocumentFrequencyChange > &dfchglist, int nofdocs)
Constructor from elements.
Definition: bindingObjects.hpp:1558
Structure representing the result of a query.
Definition: bindingObjects.hpp:2386
unsigned int nofDocumentsVisited() const
Get the total number of matches that were visited (after applying ACL restrictions, but before applying other restrictions)
Definition: bindingObjects.hpp:2398
A sequence of normalizer definitions represented as single string naming a normalizer without argumen...
Definition: bindingObjects.hpp:204
void defineVariable(const String &name, double value)
Define a variable value.
Definition: bindingObjects.hpp:1865
Document object representing one item of retrieval. A document can be manually composed of its sub pa...
Definition: bindingObjects.hpp:583
unsigned int evaluationPass() const
Get the last query evaluation pass used (level of selection features used)
Definition: bindingObjects.hpp:2394
const AttributeVector & attributes() const
Get the list of attributes of the document.
Definition: bindingObjects.hpp:659
int Index
Definition: bindingObjects.hpp:55
QueryTerm(const QueryTerm &o)
Copy constructor.
Definition: bindingObjects.hpp:1311
Attribute(const String &name_, const String &value_)
Constructor.
Definition: bindingObjects.hpp:492
Message with storage statistics.
Definition: bindingObjects.hpp:1545
Analyzer object implementing a queue of analyze document tasks.
Definition: bindingObjects.hpp:971
void set_df(GlobalCounter df_)
Set the global document frequency for a term in a query evaluation.
Definition: bindingObjects.hpp:2355
void defineParameter(const String &name, double value)
Define a parameter used for weighting.
Definition: bindingObjects.hpp:1988
void defineFeature(const String &sumtype, const String &set)
Define a weighting feature.
Definition: bindingObjects.hpp:2013
SummaryElement(const SummaryElement &o)
Copy connstructor.
Definition: bindingObjects.hpp:2126
void defineResultName(const String &origname, const String &newname)
Rename a result (each summarizer result has a default name that can be changed with this method) ...
Definition: bindingObjects.hpp:1938
void setScheme(const String &scheme_)
Set the scheme identifier of the document class.
Definition: bindingObjects.hpp:559