mhs-xapian 1.0.18a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -0
- data/AUTHORS +1 -0
- data/COPYING +340 -0
- data/ChangeLog +5876 -0
- data/HACKING +101 -0
- data/INSTALL +293 -0
- data/Makefile +722 -0
- data/Makefile.am +26 -0
- data/Makefile.in +722 -0
- data/NEWS +2110 -0
- data/README +59 -0
- data/Rakefile +51 -0
- data/TODO +47 -0
- data/aclocal.m4 +7675 -0
- data/config.guess +1501 -0
- data/config.h +56 -0
- data/config.h.in +55 -0
- data/config.status +1298 -0
- data/config.sub +1705 -0
- data/configure +18536 -0
- data/configure.ac +944 -0
- data/csharp/.deps/xapian_wrap.Plo +1 -0
- data/csharp/AssemblyInfo.cs +40 -0
- data/csharp/AssemblyInfo.cs.in +40 -0
- data/csharp/Auto.cs +46 -0
- data/csharp/BM25Weight.cs +107 -0
- data/csharp/BoolWeight.cs +103 -0
- data/csharp/Database.cs +275 -0
- data/csharp/DateValueRangeProcessor.cs +61 -0
- data/csharp/Document.cs +177 -0
- data/csharp/ESet.cs +94 -0
- data/csharp/ESetIterator.cs +117 -0
- data/csharp/Enquire.cs +274 -0
- data/csharp/ExpandDecider.cs +76 -0
- data/csharp/Flint.cs +58 -0
- data/csharp/InMemory.cs +46 -0
- data/csharp/MSet.cs +193 -0
- data/csharp/MSetIterator.cs +141 -0
- data/csharp/Makefile +868 -0
- data/csharp/Makefile.am +106 -0
- data/csharp/Makefile.in +868 -0
- data/csharp/MatchDecider.cs +76 -0
- data/csharp/MultiValueSorter.cs +63 -0
- data/csharp/NumberValueRangeProcessor.cs +61 -0
- data/csharp/PositionIterator.cs +101 -0
- data/csharp/PostingIterator.cs +125 -0
- data/csharp/Quartz.cs +58 -0
- data/csharp/Query.cs +150 -0
- data/csharp/QueryParser.cs +174 -0
- data/csharp/RSet.cs +102 -0
- data/csharp/Remote.cs +100 -0
- data/csharp/SWIGTYPE_p_std__string.cs +30 -0
- data/csharp/SWIGTYPE_p_std__vectorTXapian__Query_t.cs +30 -0
- data/csharp/SWIGTYPE_p_std__vectorTstd__string_t.cs +30 -0
- data/csharp/SimpleStopper.cs +64 -0
- data/csharp/SmokeTest.cs +178 -0
- data/csharp/Sorter.cs +76 -0
- data/csharp/Stem.cs +66 -0
- data/csharp/Stopper.cs +91 -0
- data/csharp/StringValueRangeProcessor.cs +53 -0
- data/csharp/TermGenerator.cs +152 -0
- data/csharp/TermIterator.cs +125 -0
- data/csharp/TradWeight.cs +107 -0
- data/csharp/ValueIterator.cs +102 -0
- data/csharp/ValueRangeProcessor.cs +76 -0
- data/csharp/Version.cs +60 -0
- data/csharp/Weight.cs +93 -0
- data/csharp/WritableDatabase.cs +153 -0
- data/csharp/Xapian.cs +65 -0
- data/csharp/XapianPINVOKE.cs +1527 -0
- data/csharp/docs/Makefile +450 -0
- data/csharp/docs/Makefile.am +16 -0
- data/csharp/docs/Makefile.in +450 -0
- data/csharp/docs/examples/SimpleExpand.cs +109 -0
- data/csharp/docs/examples/SimpleIndex.cs +71 -0
- data/csharp/docs/examples/SimpleSearch.cs +78 -0
- data/csharp/docs/index.html +211 -0
- data/csharp/util.i +233 -0
- data/csharp/xapian_wrap.cc +10338 -0
- data/csharp/xapian_wrap.h +93 -0
- data/depcomp +632 -0
- data/extconf.rb +20 -0
- data/generic/except.i +80 -0
- data/generic/generic.mk +48 -0
- data/install-sh +520 -0
- data/java-swig/.deps/xapian_wrap.Plo +1 -0
- data/java-swig/Auto.java +35 -0
- data/java-swig/BM25Weight.java +81 -0
- data/java-swig/BoolWeight.java +77 -0
- data/java-swig/Database.java +195 -0
- data/java-swig/DateValueRangeProcessor.java +51 -0
- data/java-swig/Document.java +135 -0
- data/java-swig/ESet.java +71 -0
- data/java-swig/ESetIterator.java +71 -0
- data/java-swig/Enquire.java +246 -0
- data/java-swig/ExpandDecider.java +59 -0
- data/java-swig/Flint.java +43 -0
- data/java-swig/InMemory.java +35 -0
- data/java-swig/MSet.java +143 -0
- data/java-swig/MSetIterator.java +87 -0
- data/java-swig/Makefile +781 -0
- data/java-swig/Makefile.am +132 -0
- data/java-swig/Makefile.in +781 -0
- data/java-swig/MatchDecider.java +59 -0
- data/java-swig/MultiValueSorter.java +51 -0
- data/java-swig/NumberValueRangeProcessor.java +51 -0
- data/java-swig/PositionIterator.java +63 -0
- data/java-swig/PostingIterator.java +83 -0
- data/java-swig/Quartz.java +43 -0
- data/java-swig/Query.java +189 -0
- data/java-swig/QueryParser.java +214 -0
- data/java-swig/RSet.java +79 -0
- data/java-swig/Remote.java +71 -0
- data/java-swig/SWIGTYPE_p_std__string.java +25 -0
- data/java-swig/SimpleStopper.java +51 -0
- data/java-swig/SmokeTest.java +161 -0
- data/java-swig/Sorter.java +59 -0
- data/java-swig/Stem.java +51 -0
- data/java-swig/Stopper.java +63 -0
- data/java-swig/StringValueRangeProcessor.java +43 -0
- data/java-swig/TermGenerator.java +158 -0
- data/java-swig/TermIterator.java +83 -0
- data/java-swig/TradWeight.java +81 -0
- data/java-swig/ValueIterator.java +67 -0
- data/java-swig/ValueRangeProcessor.java +59 -0
- data/java-swig/Version.java +47 -0
- data/java-swig/Weight.java +68 -0
- data/java-swig/WritableDatabase.java +123 -0
- data/java-swig/Xapian.java +39 -0
- data/java-swig/XapianConstants.java +15 -0
- data/java-swig/XapianJNI.java +508 -0
- data/java-swig/run-java-test +6 -0
- data/java-swig/xapian_wrap.cc +12594 -0
- data/java-swig/xapian_wrap.h +91 -0
- data/java/Makefile +660 -0
- data/java/Makefile.am +35 -0
- data/java/Makefile.in +660 -0
- data/java/README +76 -0
- data/java/SmokeTest.java +148 -0
- data/java/native/.deps/Database.Plo +1 -0
- data/java/native/.deps/Document.Plo +1 -0
- data/java/native/.deps/ESet.Plo +1 -0
- data/java/native/.deps/ESetIterator.Plo +1 -0
- data/java/native/.deps/Enquire.Plo +1 -0
- data/java/native/.deps/MSet.Plo +1 -0
- data/java/native/.deps/MSetIterator.Plo +1 -0
- data/java/native/.deps/PositionIterator.Plo +1 -0
- data/java/native/.deps/Query.Plo +1 -0
- data/java/native/.deps/RSet.Plo +1 -0
- data/java/native/.deps/Stem.Plo +1 -0
- data/java/native/.deps/TermIterator.Plo +1 -0
- data/java/native/.deps/WritableDatabase.Plo +1 -0
- data/java/native/.deps/org_xapian_XapianJNI.Plo +1 -0
- data/java/native/.deps/utils.Plo +1 -0
- data/java/native/Database.cc +222 -0
- data/java/native/Document.cc +173 -0
- data/java/native/ESet.cc +79 -0
- data/java/native/ESetIterator.cc +82 -0
- data/java/native/Enquire.cc +271 -0
- data/java/native/MSet.cc +169 -0
- data/java/native/MSetIterator.cc +107 -0
- data/java/native/Makefile +594 -0
- data/java/native/Makefile.am +51 -0
- data/java/native/Makefile.in +594 -0
- data/java/native/PositionIterator.cc +64 -0
- data/java/native/Query.cc +180 -0
- data/java/native/RSet.cc +98 -0
- data/java/native/Stem.cc +75 -0
- data/java/native/TermIterator.cc +107 -0
- data/java/native/WritableDatabase.cc +118 -0
- data/java/native/XapianObjectHolder.h +115 -0
- data/java/native/org_xapian_XapianJNI.cc +78 -0
- data/java/native/org_xapian_XapianJNI.h +1369 -0
- data/java/native/utils.cc +51 -0
- data/java/native/xapian_jni.h +116 -0
- data/java/org/xapian/Database.java +148 -0
- data/java/org/xapian/Document.java +135 -0
- data/java/org/xapian/ESet.java +66 -0
- data/java/org/xapian/ESetIterator.java +97 -0
- data/java/org/xapian/Enquire.java +136 -0
- data/java/org/xapian/ExpandDecider.java +30 -0
- data/java/org/xapian/MSet.java +104 -0
- data/java/org/xapian/MSetIterator.java +132 -0
- data/java/org/xapian/Makefile +580 -0
- data/java/org/xapian/Makefile.am +38 -0
- data/java/org/xapian/Makefile.in +580 -0
- data/java/org/xapian/MatchDecider.java +30 -0
- data/java/org/xapian/PositionIterator.java +89 -0
- data/java/org/xapian/Query.java +190 -0
- data/java/org/xapian/RSet.java +89 -0
- data/java/org/xapian/Stem.java +80 -0
- data/java/org/xapian/TermIterator.java +142 -0
- data/java/org/xapian/WritableDatabase.java +92 -0
- data/java/org/xapian/Xapian.java +114 -0
- data/java/org/xapian/XapianJNI.java +444 -0
- data/java/org/xapian/errors/AssertionError.java +40 -0
- data/java/org/xapian/errors/DatabaseCorruptError.java +40 -0
- data/java/org/xapian/errors/DatabaseError.java +40 -0
- data/java/org/xapian/errors/DatabaseLockError.java +40 -0
- data/java/org/xapian/errors/DatabaseModifiedError.java +40 -0
- data/java/org/xapian/errors/DatabaseOpeningError.java +40 -0
- data/java/org/xapian/errors/DocNotFoundError.java +40 -0
- data/java/org/xapian/errors/FeatureUnavailableError.java +40 -0
- data/java/org/xapian/errors/InternalError.java +40 -0
- data/java/org/xapian/errors/InvalidArgumentError.java +40 -0
- data/java/org/xapian/errors/InvalidOperationError.java +40 -0
- data/java/org/xapian/errors/LogicError.java +40 -0
- data/java/org/xapian/errors/Makefile +416 -0
- data/java/org/xapian/errors/Makefile.am +32 -0
- data/java/org/xapian/errors/Makefile.in +416 -0
- data/java/org/xapian/errors/NetworkError.java +40 -0
- data/java/org/xapian/errors/NetworkTimeoutError.java +40 -0
- data/java/org/xapian/errors/RangeError.java +40 -0
- data/java/org/xapian/errors/RuntimeError.java +40 -0
- data/java/org/xapian/errors/UnimplementedError.java +40 -0
- data/java/org/xapian/errors/XapianError.java +40 -0
- data/java/org/xapian/errors/XapianRuntimeError.java +49 -0
- data/java/org/xapian/examples/Makefile +391 -0
- data/java/org/xapian/examples/Makefile.am +8 -0
- data/java/org/xapian/examples/Makefile.in +391 -0
- data/java/org/xapian/examples/SimpleIndex.java +68 -0
- data/java/org/xapian/examples/SimpleSearch.java +71 -0
- data/java/run-java-test +6 -0
- data/libtool +7618 -0
- data/ltmain.sh +6956 -0
- data/mhs-xapian.gemspec +368 -0
- data/missing +378 -0
- data/php/.deps/xapian_wrap.Plo +1 -0
- data/php/Makefile +871 -0
- data/php/Makefile.am +82 -0
- data/php/Makefile.in +871 -0
- data/php/docs/Makefile +453 -0
- data/php/docs/Makefile.am +19 -0
- data/php/docs/Makefile.in +453 -0
- data/php/docs/examples/simpleexpand.php4 +108 -0
- data/php/docs/examples/simpleexpand.php5 +104 -0
- data/php/docs/examples/simpleindex.php4 +76 -0
- data/php/docs/examples/simpleindex.php5 +73 -0
- data/php/docs/examples/simplesearch.php4 +75 -0
- data/php/docs/examples/simplesearch.php5 +72 -0
- data/php/docs/index.html +313 -0
- data/php/except.i +98 -0
- data/php/php4/php_xapian.h +323 -0
- data/php/php4/xapian.php +32 -0
- data/php/php4/xapian_wrap.cc +27656 -0
- data/php/php5/php_xapian.h +319 -0
- data/php/php5/xapian.php +1566 -0
- data/php/php5/xapian_wrap.cc +24330 -0
- data/php/smoketest.php +246 -0
- data/php/smoketest4.php +84 -0
- data/php/smoketest5.php +79 -0
- data/php/util.i +187 -0
- data/python/.deps/xapian_wrap.Plo +1 -0
- data/python/Makefile +891 -0
- data/python/Makefile.am +105 -0
- data/python/Makefile.in +891 -0
- data/python/doccomments.i +5134 -0
- data/python/docs/Makefile +448 -0
- data/python/docs/Makefile.am +14 -0
- data/python/docs/Makefile.in +448 -0
- data/python/docs/examples/simpleexpand.py +98 -0
- data/python/docs/examples/simpleindex.py +65 -0
- data/python/docs/examples/simplematchdecider.py +78 -0
- data/python/docs/examples/simplesearch.py +65 -0
- data/python/docs/index.html +420 -0
- data/python/except.i +290 -0
- data/python/extra.i +1048 -0
- data/python/extracomments.i +28 -0
- data/python/generate-python-exceptions +189 -0
- data/python/generate-python-exceptions.in +189 -0
- data/python/modern/xapian.py +5662 -0
- data/python/modern/xapian_wrap.cc +35170 -0
- data/python/modern/xapian_wrap.h +244 -0
- data/python/pythontest.py +1110 -0
- data/python/smoketest.py +328 -0
- data/python/testsuite.py +382 -0
- data/python/util.i +517 -0
- data/ruby/.deps/xapian_wrap.Plo +494 -0
- data/ruby/.libs/_xapian.bundle +0 -0
- data/ruby/.libs/_xapian.bundle.dSYM/Contents/Info.plist +25 -0
- data/ruby/.libs/_xapian.bundle.dSYM/Contents/Resources/DWARF/_xapian.bundle +0 -0
- data/ruby/.libs/_xapian.la +35 -0
- data/ruby/.libs/_xapian.lai +35 -0
- data/ruby/Makefile +854 -0
- data/ruby/Makefile.am +62 -0
- data/ruby/Makefile.in +854 -0
- data/ruby/_xapian.la +35 -0
- data/ruby/docs/Makefile +487 -0
- data/ruby/docs/Makefile.am +50 -0
- data/ruby/docs/Makefile.in +487 -0
- data/ruby/docs/examples/simpleexpand.rb +98 -0
- data/ruby/docs/examples/simpleindex.rb +60 -0
- data/ruby/docs/examples/simplematchdecider.rb +74 -0
- data/ruby/docs/examples/simplesearch.rb +63 -0
- data/ruby/docs/index.html +197 -0
- data/ruby/smoketest.rb +211 -0
- data/ruby/util.i +232 -0
- data/ruby/xapian.rb +280 -0
- data/ruby/xapian_wrap.cc +25837 -0
- data/ruby/xapian_wrap.h +65 -0
- data/ruby/xapian_wrap.lo +12 -0
- data/skiptest +2 -0
- data/stamp-h1 +1 -0
- data/tcl8/.deps/xapian_wrap.Plo +1 -0
- data/tcl8/Makefile +835 -0
- data/tcl8/Makefile.am +49 -0
- data/tcl8/Makefile.in +835 -0
- data/tcl8/docs/Makefile +448 -0
- data/tcl8/docs/Makefile.am +14 -0
- data/tcl8/docs/Makefile.in +448 -0
- data/tcl8/docs/examples/simpleexpand.tcl +104 -0
- data/tcl8/docs/examples/simpleindex.tcl +68 -0
- data/tcl8/docs/examples/simplesearch.tcl +66 -0
- data/tcl8/docs/index.html +208 -0
- data/tcl8/except.i +48 -0
- data/tcl8/pkgIndex.tcl +1 -0
- data/tcl8/pkgIndex.tcl.in +1 -0
- data/tcl8/run-tcl-test +15 -0
- data/tcl8/runtest.tcl +29 -0
- data/tcl8/smoketest.tcl +155 -0
- data/tcl8/util.i +76 -0
- data/tcl8/xapian_wrap.cc +20900 -0
- data/xapian-bindings.spec +206 -0
- data/xapian-bindings.spec.in +206 -0
- data/xapian-version.h +1 -0
- data/xapian-version.h.in +1 -0
- data/xapian.i +939 -0
- metadata +395 -0
@@ -0,0 +1,319 @@
|
|
1
|
+
/* ----------------------------------------------------------------------------
|
2
|
+
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
+
* Version 1.3.32
|
4
|
+
*
|
5
|
+
* This file is not intended to be easily readable and contains a number of
|
6
|
+
* coding conventions designed to improve portability and efficiency. Do not make
|
7
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
8
|
+
* interface file instead.
|
9
|
+
* ----------------------------------------------------------------------------- */
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
#ifndef PHP_XAPIAN_H
|
14
|
+
#define PHP_XAPIAN_H
|
15
|
+
|
16
|
+
extern zend_module_entry xapian_module_entry;
|
17
|
+
#define phpext_xapian_ptr &xapian_module_entry
|
18
|
+
|
19
|
+
#ifdef PHP_WIN32
|
20
|
+
# define PHP_XAPIAN_API __declspec(dllexport)
|
21
|
+
#else
|
22
|
+
# define PHP_XAPIAN_API
|
23
|
+
#endif
|
24
|
+
|
25
|
+
#ifdef ZTS
|
26
|
+
#include "TSRM.h"
|
27
|
+
#endif
|
28
|
+
|
29
|
+
PHP_MINIT_FUNCTION(xapian);
|
30
|
+
PHP_MSHUTDOWN_FUNCTION(xapian);
|
31
|
+
PHP_RINIT_FUNCTION(xapian);
|
32
|
+
PHP_RSHUTDOWN_FUNCTION(xapian);
|
33
|
+
PHP_MINFO_FUNCTION(xapian);
|
34
|
+
|
35
|
+
ZEND_NAMED_FUNCTION(_wrap_BAD_VALUENO_get);
|
36
|
+
ZEND_NAMED_FUNCTION(_wrap_version_string);
|
37
|
+
ZEND_NAMED_FUNCTION(_wrap_major_version);
|
38
|
+
ZEND_NAMED_FUNCTION(_wrap_minor_version);
|
39
|
+
ZEND_NAMED_FUNCTION(_wrap_revision);
|
40
|
+
ZEND_NAMED_FUNCTION(_wrap_new_PositionIterator);
|
41
|
+
ZEND_NAMED_FUNCTION(_wrap_PositionIterator_get_termpos);
|
42
|
+
ZEND_NAMED_FUNCTION(_wrap_PositionIterator_next);
|
43
|
+
ZEND_NAMED_FUNCTION(_wrap_PositionIterator_equals);
|
44
|
+
ZEND_NAMED_FUNCTION(_wrap_PositionIterator_skip_to);
|
45
|
+
ZEND_NAMED_FUNCTION(_wrap_PositionIterator_get_description);
|
46
|
+
ZEND_NAMED_FUNCTION(_wrap_new_PostingIterator);
|
47
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_skip_to);
|
48
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_doclength);
|
49
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_wdf);
|
50
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_positionlist_begin);
|
51
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_positionlist_end);
|
52
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_description);
|
53
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_get_docid);
|
54
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_next);
|
55
|
+
ZEND_NAMED_FUNCTION(_wrap_PostingIterator_equals);
|
56
|
+
ZEND_NAMED_FUNCTION(_wrap_new_TermIterator);
|
57
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_term);
|
58
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_next);
|
59
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_equals);
|
60
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_skip_to);
|
61
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_wdf);
|
62
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_termfreq);
|
63
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_positionlist_begin);
|
64
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_positionlist_end);
|
65
|
+
ZEND_NAMED_FUNCTION(_wrap_TermIterator_get_description);
|
66
|
+
ZEND_NAMED_FUNCTION(_wrap_new_ValueIterator);
|
67
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_value);
|
68
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueIterator_next);
|
69
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueIterator_equals);
|
70
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_valueno);
|
71
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueIterator_get_description);
|
72
|
+
ZEND_NAMED_FUNCTION(_wrap_new_Document);
|
73
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_get_value);
|
74
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_add_value);
|
75
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_remove_value);
|
76
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_clear_values);
|
77
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_get_data);
|
78
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_set_data);
|
79
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_add_posting);
|
80
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_add_term);
|
81
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_add_boolean_term);
|
82
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_remove_posting);
|
83
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_remove_term);
|
84
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_clear_terms);
|
85
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_termlist_count);
|
86
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_termlist_begin);
|
87
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_termlist_end);
|
88
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_values_count);
|
89
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_values_begin);
|
90
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_values_end);
|
91
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_get_docid);
|
92
|
+
ZEND_NAMED_FUNCTION(_wrap_Document_get_description);
|
93
|
+
ZEND_NAMED_FUNCTION(_wrap_new_MSet);
|
94
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_fetch);
|
95
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_convert_to_percent);
|
96
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_termfreq);
|
97
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_termweight);
|
98
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_firstitem);
|
99
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_lower_bound);
|
100
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_estimated);
|
101
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_matches_upper_bound);
|
102
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_max_possible);
|
103
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_max_attained);
|
104
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_size);
|
105
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_is_empty);
|
106
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_begin);
|
107
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_end);
|
108
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_back);
|
109
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_hit);
|
110
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_document_percentage);
|
111
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_document);
|
112
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_docid);
|
113
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_document_id);
|
114
|
+
ZEND_NAMED_FUNCTION(_wrap_MSet_get_description);
|
115
|
+
ZEND_NAMED_FUNCTION(_wrap_new_MSetIterator);
|
116
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_docid);
|
117
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_next);
|
118
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_prev);
|
119
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_equals);
|
120
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_document);
|
121
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_rank);
|
122
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_weight);
|
123
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_collapse_key);
|
124
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_collapse_count);
|
125
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_percent);
|
126
|
+
ZEND_NAMED_FUNCTION(_wrap_MSetIterator_get_description);
|
127
|
+
ZEND_NAMED_FUNCTION(_wrap_new_ESet);
|
128
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_get_ebound);
|
129
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_size);
|
130
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_is_empty);
|
131
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_begin);
|
132
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_end);
|
133
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_back);
|
134
|
+
ZEND_NAMED_FUNCTION(_wrap_ESet_get_description);
|
135
|
+
ZEND_NAMED_FUNCTION(_wrap_new_ESetIterator);
|
136
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_termname);
|
137
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_term);
|
138
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_next);
|
139
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_prev);
|
140
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_equals);
|
141
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_weight);
|
142
|
+
ZEND_NAMED_FUNCTION(_wrap_ESetIterator_get_description);
|
143
|
+
ZEND_NAMED_FUNCTION(_wrap_new_RSet);
|
144
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_size);
|
145
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_is_empty);
|
146
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_add_document);
|
147
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_remove_document);
|
148
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_contains);
|
149
|
+
ZEND_NAMED_FUNCTION(_wrap_RSet_get_description);
|
150
|
+
ZEND_NAMED_FUNCTION(_wrap_MatchDecider_apply);
|
151
|
+
ZEND_NAMED_FUNCTION(_wrap_new_Enquire);
|
152
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_query);
|
153
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_query);
|
154
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_weighting_scheme);
|
155
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_collapse_key);
|
156
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_docid_order);
|
157
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_cutoff);
|
158
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance);
|
159
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_value);
|
160
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_value_then_relevance);
|
161
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance_then_value);
|
162
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_key);
|
163
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_key_then_relevance);
|
164
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_set_sort_by_relevance_then_key);
|
165
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_mset);
|
166
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_eset);
|
167
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_begin);
|
168
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms_end);
|
169
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_matching_terms);
|
170
|
+
ZEND_NAMED_FUNCTION(_wrap_Enquire_get_description);
|
171
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_name);
|
172
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_serialise);
|
173
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_unserialise);
|
174
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_get_sumpart);
|
175
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_get_maxpart);
|
176
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_get_sumextra);
|
177
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_get_maxextra);
|
178
|
+
ZEND_NAMED_FUNCTION(_wrap_Weight_get_sumpart_needs_doclength);
|
179
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_clone_object);
|
180
|
+
ZEND_NAMED_FUNCTION(_wrap_new_BoolWeight);
|
181
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_name);
|
182
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_serialise);
|
183
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_unserialise);
|
184
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_sumpart);
|
185
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_maxpart);
|
186
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_sumextra);
|
187
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_maxextra);
|
188
|
+
ZEND_NAMED_FUNCTION(_wrap_BoolWeight_get_sumpart_needs_doclength);
|
189
|
+
ZEND_NAMED_FUNCTION(_wrap_new_BM25Weight);
|
190
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_clone_object);
|
191
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_name);
|
192
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_serialise);
|
193
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_unserialise);
|
194
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_sumpart);
|
195
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_maxpart);
|
196
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_sumextra);
|
197
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_maxextra);
|
198
|
+
ZEND_NAMED_FUNCTION(_wrap_BM25Weight_get_sumpart_needs_doclength);
|
199
|
+
ZEND_NAMED_FUNCTION(_wrap_new_TradWeight);
|
200
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_clone_object);
|
201
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_name);
|
202
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_serialise);
|
203
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_unserialise);
|
204
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_sumpart);
|
205
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_maxpart);
|
206
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_sumextra);
|
207
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_maxextra);
|
208
|
+
ZEND_NAMED_FUNCTION(_wrap_TradWeight_get_sumpart_needs_doclength);
|
209
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_add_database);
|
210
|
+
ZEND_NAMED_FUNCTION(_wrap_new_Database);
|
211
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_reopen);
|
212
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_description);
|
213
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_postlist_begin);
|
214
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_postlist_end);
|
215
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_termlist_begin);
|
216
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_termlist_end);
|
217
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_positionlist_begin);
|
218
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_positionlist_end);
|
219
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_allterms_begin);
|
220
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_allterms_end);
|
221
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_doccount);
|
222
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_lastdocid);
|
223
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_avlength);
|
224
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_termfreq);
|
225
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_term_exists);
|
226
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_collection_freq);
|
227
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_doclength);
|
228
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_keep_alive);
|
229
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_document);
|
230
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_spelling_suggestion);
|
231
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_spellings_begin);
|
232
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_spellings_end);
|
233
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_synonyms_begin);
|
234
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_synonyms_end);
|
235
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_begin);
|
236
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_synonym_keys_end);
|
237
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_get_metadata);
|
238
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_begin);
|
239
|
+
ZEND_NAMED_FUNCTION(_wrap_Database_metadata_keys_end);
|
240
|
+
ZEND_NAMED_FUNCTION(_wrap_new_WritableDatabase);
|
241
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_flush);
|
242
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_begin_transaction);
|
243
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_commit_transaction);
|
244
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_cancel_transaction);
|
245
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_document);
|
246
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_delete_document);
|
247
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_replace_document);
|
248
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_spelling);
|
249
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_spelling);
|
250
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_add_synonym);
|
251
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_remove_synonym);
|
252
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_clear_synonyms);
|
253
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_set_metadata);
|
254
|
+
ZEND_NAMED_FUNCTION(_wrap_WritableDatabase_get_description);
|
255
|
+
ZEND_NAMED_FUNCTION(_wrap_auto_open_stub);
|
256
|
+
ZEND_NAMED_FUNCTION(_wrap_quartz_open);
|
257
|
+
ZEND_NAMED_FUNCTION(_wrap_flint_open);
|
258
|
+
ZEND_NAMED_FUNCTION(_wrap_inmemory_open);
|
259
|
+
ZEND_NAMED_FUNCTION(_wrap_remote_open);
|
260
|
+
ZEND_NAMED_FUNCTION(_wrap_remote_open_writable);
|
261
|
+
ZEND_NAMED_FUNCTION(_wrap_new_Query);
|
262
|
+
ZEND_NAMED_FUNCTION(_wrap_Query_get_length);
|
263
|
+
ZEND_NAMED_FUNCTION(_wrap_Query_get_terms_begin);
|
264
|
+
ZEND_NAMED_FUNCTION(_wrap_Query_get_terms_end);
|
265
|
+
ZEND_NAMED_FUNCTION(_wrap_Query_is_empty);
|
266
|
+
ZEND_NAMED_FUNCTION(_wrap_Query_get_description);
|
267
|
+
ZEND_NAMED_FUNCTION(_wrap_Stopper_apply);
|
268
|
+
ZEND_NAMED_FUNCTION(_wrap_Stopper_get_description);
|
269
|
+
ZEND_NAMED_FUNCTION(_wrap_new_SimpleStopper);
|
270
|
+
ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_add);
|
271
|
+
ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_apply);
|
272
|
+
ZEND_NAMED_FUNCTION(_wrap_SimpleStopper_get_description);
|
273
|
+
ZEND_NAMED_FUNCTION(_wrap_ValueRangeProcessor_apply);
|
274
|
+
ZEND_NAMED_FUNCTION(_wrap_new_StringValueRangeProcessor);
|
275
|
+
ZEND_NAMED_FUNCTION(_wrap_StringValueRangeProcessor_apply);
|
276
|
+
ZEND_NAMED_FUNCTION(_wrap_new_DateValueRangeProcessor);
|
277
|
+
ZEND_NAMED_FUNCTION(_wrap_DateValueRangeProcessor_apply);
|
278
|
+
ZEND_NAMED_FUNCTION(_wrap_new_NumberValueRangeProcessor);
|
279
|
+
ZEND_NAMED_FUNCTION(_wrap_NumberValueRangeProcessor_apply);
|
280
|
+
ZEND_NAMED_FUNCTION(_wrap_new_QueryParser);
|
281
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stemmer);
|
282
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stemming_strategy);
|
283
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_stopper);
|
284
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_default_op);
|
285
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_default_op);
|
286
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_set_database);
|
287
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_parse_query);
|
288
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_prefix);
|
289
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_boolean_prefix);
|
290
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_stoplist_begin);
|
291
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_stoplist_end);
|
292
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_unstem_begin);
|
293
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_unstem_end);
|
294
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_add_valuerangeprocessor);
|
295
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_corrected_query_string);
|
296
|
+
ZEND_NAMED_FUNCTION(_wrap_QueryParser_get_description);
|
297
|
+
ZEND_NAMED_FUNCTION(_wrap_sortable_serialise);
|
298
|
+
ZEND_NAMED_FUNCTION(_wrap_sortable_unserialise);
|
299
|
+
ZEND_NAMED_FUNCTION(_wrap_new_Stem);
|
300
|
+
ZEND_NAMED_FUNCTION(_wrap_Stem_apply);
|
301
|
+
ZEND_NAMED_FUNCTION(_wrap_Stem_get_description);
|
302
|
+
ZEND_NAMED_FUNCTION(_wrap_Stem_get_available_languages);
|
303
|
+
ZEND_NAMED_FUNCTION(_wrap_new_TermGenerator);
|
304
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stemmer);
|
305
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_stopper);
|
306
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_document);
|
307
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_document);
|
308
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_database);
|
309
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_flags);
|
310
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text);
|
311
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_index_text_without_positions);
|
312
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_increase_termpos);
|
313
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_termpos);
|
314
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_set_termpos);
|
315
|
+
ZEND_NAMED_FUNCTION(_wrap_TermGenerator_get_description);
|
316
|
+
ZEND_NAMED_FUNCTION(_wrap_new_MultiValueSorter);
|
317
|
+
ZEND_NAMED_FUNCTION(_wrap_MultiValueSorter_apply);
|
318
|
+
ZEND_NAMED_FUNCTION(_wrap_MultiValueSorter_add);
|
319
|
+
#endif /* PHP_XAPIAN_H */
|
data/php/php5/xapian.php
ADDED
@@ -0,0 +1,1566 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/* ----------------------------------------------------------------------------
|
4
|
+
* This file was automatically generated by SWIG (http://www.swig.org).
|
5
|
+
* Version 1.3.32
|
6
|
+
*
|
7
|
+
* This file is not intended to be easily readable and contains a number of
|
8
|
+
* coding conventions designed to improve portability and efficiency. Do not make
|
9
|
+
* changes to this file unless you know what you are doing--modify the SWIG
|
10
|
+
* interface file instead.
|
11
|
+
* ----------------------------------------------------------------------------- */
|
12
|
+
|
13
|
+
// Try to load our extension if it's not already loaded.
|
14
|
+
if (!extension_loaded("xapian")) {
|
15
|
+
if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
|
16
|
+
if (!dl('php_xapian.dll')) return;
|
17
|
+
} else {
|
18
|
+
// PHP_SHLIB_SUFFIX is available as of PHP 4.3.0, for older PHP assume 'so'.
|
19
|
+
// It gives 'dylib' on MacOS X which is for libraries, modules are 'so'.
|
20
|
+
if (PHP_SHLIB_SUFFIX === 'PHP_SHLIB_SUFFIX' || PHP_SHLIB_SUFFIX === 'dylib') {
|
21
|
+
if (!dl('xapian.so')) return;
|
22
|
+
} else {
|
23
|
+
if (!dl('xapian.'.PHP_SHLIB_SUFFIX)) return;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
abstract class Xapian {
|
31
|
+
static function BAD_VALUENO_get() {
|
32
|
+
return BAD_VALUENO_get();
|
33
|
+
}
|
34
|
+
|
35
|
+
static function version_string() {
|
36
|
+
return version_string();
|
37
|
+
}
|
38
|
+
|
39
|
+
static function major_version() {
|
40
|
+
return major_version();
|
41
|
+
}
|
42
|
+
|
43
|
+
static function minor_version() {
|
44
|
+
return minor_version();
|
45
|
+
}
|
46
|
+
|
47
|
+
static function revision() {
|
48
|
+
return revision();
|
49
|
+
}
|
50
|
+
|
51
|
+
const DB_CREATE_OR_OPEN = DB_CREATE_OR_OPEN;
|
52
|
+
|
53
|
+
const DB_CREATE = DB_CREATE;
|
54
|
+
|
55
|
+
const DB_CREATE_OR_OVERWRITE = DB_CREATE_OR_OVERWRITE;
|
56
|
+
|
57
|
+
const DB_OPEN = DB_OPEN;
|
58
|
+
|
59
|
+
static function auto_open_stub($file) {
|
60
|
+
$r=auto_open_stub($file);
|
61
|
+
return is_resource($r) ? new XapianDatabase($r) : $r;
|
62
|
+
}
|
63
|
+
|
64
|
+
static function quartz_open($dir,$action=null,$block_size=8192) {
|
65
|
+
switch (func_num_args()) {
|
66
|
+
case 1: $r=quartz_open($dir); break;
|
67
|
+
default: $r=quartz_open($dir,$action,$block_size);
|
68
|
+
}
|
69
|
+
if (!is_resource($r)) return $r;
|
70
|
+
switch (get_resource_type($r)) {
|
71
|
+
case "_p_Xapian__WritableDatabase": return new XapianWritableDatabase($r);
|
72
|
+
default: return new XapianDatabase($r);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
static function flint_open($dir,$action=null,$block_size=8192) {
|
77
|
+
switch (func_num_args()) {
|
78
|
+
case 1: $r=flint_open($dir); break;
|
79
|
+
default: $r=flint_open($dir,$action,$block_size);
|
80
|
+
}
|
81
|
+
if (!is_resource($r)) return $r;
|
82
|
+
switch (get_resource_type($r)) {
|
83
|
+
case "_p_Xapian__WritableDatabase": return new XapianWritableDatabase($r);
|
84
|
+
default: return new XapianDatabase($r);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
static function inmemory_open() {
|
89
|
+
$r=inmemory_open();
|
90
|
+
return is_resource($r) ? new XapianWritableDatabase($r) : $r;
|
91
|
+
}
|
92
|
+
|
93
|
+
static function remote_open($host_or_program,$port_or_args,$timeout=10000,$connect_timeout=null) {
|
94
|
+
switch (func_num_args()) {
|
95
|
+
case 2: case 3: $r=remote_open($host_or_program,$port_or_args,$timeout); break;
|
96
|
+
default: $r=remote_open($host_or_program,$port_or_args,$timeout,$connect_timeout);
|
97
|
+
}
|
98
|
+
return is_resource($r) ? new XapianDatabase($r) : $r;
|
99
|
+
}
|
100
|
+
|
101
|
+
static function remote_open_writable($host_or_program,$port_or_args,$timeout=10000,$connect_timeout=null) {
|
102
|
+
switch (func_num_args()) {
|
103
|
+
case 2: case 3: $r=remote_open_writable($host_or_program,$port_or_args,$timeout); break;
|
104
|
+
default: $r=remote_open_writable($host_or_program,$port_or_args,$timeout,$connect_timeout);
|
105
|
+
}
|
106
|
+
return is_resource($r) ? new XapianWritableDatabase($r) : $r;
|
107
|
+
}
|
108
|
+
|
109
|
+
static function sortable_serialise($value) {
|
110
|
+
return sortable_serialise($value);
|
111
|
+
}
|
112
|
+
|
113
|
+
static function sortable_unserialise($value) {
|
114
|
+
return sortable_unserialise($value);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
/* PHP Proxy Classes */
|
119
|
+
class XapianPositionIterator {
|
120
|
+
public $_cPtr=null;
|
121
|
+
|
122
|
+
function __construct($other=null) {
|
123
|
+
switch (func_num_args()) {
|
124
|
+
case 0: $r=new_PositionIterator(); break;
|
125
|
+
default: $r=new_PositionIterator($other);
|
126
|
+
}
|
127
|
+
$this->_cPtr=$r;
|
128
|
+
}
|
129
|
+
|
130
|
+
function get_termpos() {
|
131
|
+
return PositionIterator_get_termpos($this->_cPtr);
|
132
|
+
}
|
133
|
+
|
134
|
+
function next() {
|
135
|
+
PositionIterator_next($this->_cPtr);
|
136
|
+
}
|
137
|
+
|
138
|
+
function equals($other) {
|
139
|
+
return PositionIterator_equals($this->_cPtr,$other);
|
140
|
+
}
|
141
|
+
|
142
|
+
function skip_to($pos) {
|
143
|
+
PositionIterator_skip_to($this->_cPtr,$pos);
|
144
|
+
}
|
145
|
+
|
146
|
+
function get_description() {
|
147
|
+
return PositionIterator_get_description($this->_cPtr);
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
class XapianPostingIterator {
|
152
|
+
public $_cPtr=null;
|
153
|
+
|
154
|
+
function __construct($other=null) {
|
155
|
+
switch (func_num_args()) {
|
156
|
+
case 0: $r=new_PostingIterator(); break;
|
157
|
+
default: $r=new_PostingIterator($other);
|
158
|
+
}
|
159
|
+
$this->_cPtr=$r;
|
160
|
+
}
|
161
|
+
|
162
|
+
function skip_to($did) {
|
163
|
+
PostingIterator_skip_to($this->_cPtr,$did);
|
164
|
+
}
|
165
|
+
|
166
|
+
function get_doclength() {
|
167
|
+
return PostingIterator_get_doclength($this->_cPtr);
|
168
|
+
}
|
169
|
+
|
170
|
+
function get_wdf() {
|
171
|
+
return PostingIterator_get_wdf($this->_cPtr);
|
172
|
+
}
|
173
|
+
|
174
|
+
function positionlist_begin() {
|
175
|
+
$r=PostingIterator_positionlist_begin($this->_cPtr);
|
176
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
177
|
+
}
|
178
|
+
|
179
|
+
function positionlist_end() {
|
180
|
+
$r=PostingIterator_positionlist_end($this->_cPtr);
|
181
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
182
|
+
}
|
183
|
+
|
184
|
+
function get_description() {
|
185
|
+
return PostingIterator_get_description($this->_cPtr);
|
186
|
+
}
|
187
|
+
|
188
|
+
function get_docid() {
|
189
|
+
return PostingIterator_get_docid($this->_cPtr);
|
190
|
+
}
|
191
|
+
|
192
|
+
function next() {
|
193
|
+
PostingIterator_next($this->_cPtr);
|
194
|
+
}
|
195
|
+
|
196
|
+
function equals($other) {
|
197
|
+
return PostingIterator_equals($this->_cPtr,$other);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
|
201
|
+
class XapianTermIterator {
|
202
|
+
public $_cPtr=null;
|
203
|
+
|
204
|
+
function __construct($other=null) {
|
205
|
+
switch (func_num_args()) {
|
206
|
+
case 0: $r=new_TermIterator(); break;
|
207
|
+
default: $r=new_TermIterator($other);
|
208
|
+
}
|
209
|
+
$this->_cPtr=$r;
|
210
|
+
}
|
211
|
+
|
212
|
+
function get_term() {
|
213
|
+
return TermIterator_get_term($this->_cPtr);
|
214
|
+
}
|
215
|
+
|
216
|
+
function next() {
|
217
|
+
TermIterator_next($this->_cPtr);
|
218
|
+
}
|
219
|
+
|
220
|
+
function equals($other) {
|
221
|
+
return TermIterator_equals($this->_cPtr,$other);
|
222
|
+
}
|
223
|
+
|
224
|
+
function skip_to($tname) {
|
225
|
+
TermIterator_skip_to($this->_cPtr,$tname);
|
226
|
+
}
|
227
|
+
|
228
|
+
function get_wdf() {
|
229
|
+
return TermIterator_get_wdf($this->_cPtr);
|
230
|
+
}
|
231
|
+
|
232
|
+
function get_termfreq() {
|
233
|
+
return TermIterator_get_termfreq($this->_cPtr);
|
234
|
+
}
|
235
|
+
|
236
|
+
function positionlist_begin() {
|
237
|
+
$r=TermIterator_positionlist_begin($this->_cPtr);
|
238
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
239
|
+
}
|
240
|
+
|
241
|
+
function positionlist_end() {
|
242
|
+
$r=TermIterator_positionlist_end($this->_cPtr);
|
243
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
244
|
+
}
|
245
|
+
|
246
|
+
function get_description() {
|
247
|
+
return TermIterator_get_description($this->_cPtr);
|
248
|
+
}
|
249
|
+
}
|
250
|
+
|
251
|
+
class XapianValueIterator {
|
252
|
+
public $_cPtr=null;
|
253
|
+
|
254
|
+
function __construct($other=null) {
|
255
|
+
switch (func_num_args()) {
|
256
|
+
case 0: $r=new_ValueIterator(); break;
|
257
|
+
default: $r=new_ValueIterator($other);
|
258
|
+
}
|
259
|
+
$this->_cPtr=$r;
|
260
|
+
}
|
261
|
+
|
262
|
+
function get_value() {
|
263
|
+
return ValueIterator_get_value($this->_cPtr);
|
264
|
+
}
|
265
|
+
|
266
|
+
function next() {
|
267
|
+
ValueIterator_next($this->_cPtr);
|
268
|
+
}
|
269
|
+
|
270
|
+
function equals($other) {
|
271
|
+
return ValueIterator_equals($this->_cPtr,$other);
|
272
|
+
}
|
273
|
+
|
274
|
+
function get_valueno() {
|
275
|
+
return ValueIterator_get_valueno($this->_cPtr);
|
276
|
+
}
|
277
|
+
|
278
|
+
function get_description() {
|
279
|
+
return ValueIterator_get_description($this->_cPtr);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
class XapianDocument {
|
284
|
+
public $_cPtr=null;
|
285
|
+
|
286
|
+
function __construct($other=null) {
|
287
|
+
switch (func_num_args()) {
|
288
|
+
case 0: $r=new_Document(); break;
|
289
|
+
default: $r=new_Document($other);
|
290
|
+
}
|
291
|
+
$this->_cPtr=$r;
|
292
|
+
}
|
293
|
+
|
294
|
+
function get_value($valueno) {
|
295
|
+
return Document_get_value($this->_cPtr,$valueno);
|
296
|
+
}
|
297
|
+
|
298
|
+
function add_value($valueno,$value) {
|
299
|
+
Document_add_value($this->_cPtr,$valueno,$value);
|
300
|
+
}
|
301
|
+
|
302
|
+
function remove_value($valueno) {
|
303
|
+
Document_remove_value($this->_cPtr,$valueno);
|
304
|
+
}
|
305
|
+
|
306
|
+
function clear_values() {
|
307
|
+
Document_clear_values($this->_cPtr);
|
308
|
+
}
|
309
|
+
|
310
|
+
function get_data() {
|
311
|
+
return Document_get_data($this->_cPtr);
|
312
|
+
}
|
313
|
+
|
314
|
+
function set_data($data) {
|
315
|
+
Document_set_data($this->_cPtr,$data);
|
316
|
+
}
|
317
|
+
|
318
|
+
function add_posting($tname,$tpos,$wdfinc=1) {
|
319
|
+
Document_add_posting($this->_cPtr,$tname,$tpos,$wdfinc);
|
320
|
+
}
|
321
|
+
|
322
|
+
function add_term($tname,$wdfinc=1) {
|
323
|
+
Document_add_term($this->_cPtr,$tname,$wdfinc);
|
324
|
+
}
|
325
|
+
|
326
|
+
function add_boolean_term($term) {
|
327
|
+
Document_add_boolean_term($this->_cPtr,$term);
|
328
|
+
}
|
329
|
+
|
330
|
+
function remove_posting($tname,$tpos,$wdfdec=1) {
|
331
|
+
Document_remove_posting($this->_cPtr,$tname,$tpos,$wdfdec);
|
332
|
+
}
|
333
|
+
|
334
|
+
function remove_term($tname) {
|
335
|
+
Document_remove_term($this->_cPtr,$tname);
|
336
|
+
}
|
337
|
+
|
338
|
+
function clear_terms() {
|
339
|
+
Document_clear_terms($this->_cPtr);
|
340
|
+
}
|
341
|
+
|
342
|
+
function termlist_count() {
|
343
|
+
return Document_termlist_count($this->_cPtr);
|
344
|
+
}
|
345
|
+
|
346
|
+
function termlist_begin() {
|
347
|
+
$r=Document_termlist_begin($this->_cPtr);
|
348
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
349
|
+
}
|
350
|
+
|
351
|
+
function termlist_end() {
|
352
|
+
$r=Document_termlist_end($this->_cPtr);
|
353
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
354
|
+
}
|
355
|
+
|
356
|
+
function values_count() {
|
357
|
+
return Document_values_count($this->_cPtr);
|
358
|
+
}
|
359
|
+
|
360
|
+
function values_begin() {
|
361
|
+
$r=Document_values_begin($this->_cPtr);
|
362
|
+
return is_resource($r) ? new XapianValueIterator($r) : $r;
|
363
|
+
}
|
364
|
+
|
365
|
+
function values_end() {
|
366
|
+
$r=Document_values_end($this->_cPtr);
|
367
|
+
return is_resource($r) ? new XapianValueIterator($r) : $r;
|
368
|
+
}
|
369
|
+
|
370
|
+
function get_docid() {
|
371
|
+
return Document_get_docid($this->_cPtr);
|
372
|
+
}
|
373
|
+
|
374
|
+
function get_description() {
|
375
|
+
return Document_get_description($this->_cPtr);
|
376
|
+
}
|
377
|
+
}
|
378
|
+
|
379
|
+
class XapianMSet {
|
380
|
+
public $_cPtr=null;
|
381
|
+
|
382
|
+
function __construct($other=null) {
|
383
|
+
switch (func_num_args()) {
|
384
|
+
case 0: $r=new_MSet(); break;
|
385
|
+
default: $r=new_MSet($other);
|
386
|
+
}
|
387
|
+
$this->_cPtr=$r;
|
388
|
+
}
|
389
|
+
|
390
|
+
function fetch($begin_or_item=null,$end=null) {
|
391
|
+
switch (func_num_args()) {
|
392
|
+
case 0: MSet_fetch($this->_cPtr); break;
|
393
|
+
case 1: MSet_fetch($this->_cPtr,$begin_or_item); break;
|
394
|
+
default: MSet_fetch($this->_cPtr,$begin_or_item,$end);
|
395
|
+
}
|
396
|
+
}
|
397
|
+
|
398
|
+
function convert_to_percent($wt_or_item) {
|
399
|
+
return MSet_convert_to_percent($this->_cPtr,$wt_or_item);
|
400
|
+
}
|
401
|
+
|
402
|
+
function get_termfreq($tname) {
|
403
|
+
return MSet_get_termfreq($this->_cPtr,$tname);
|
404
|
+
}
|
405
|
+
|
406
|
+
function get_termweight($tname) {
|
407
|
+
return MSet_get_termweight($this->_cPtr,$tname);
|
408
|
+
}
|
409
|
+
|
410
|
+
function get_firstitem() {
|
411
|
+
return MSet_get_firstitem($this->_cPtr);
|
412
|
+
}
|
413
|
+
|
414
|
+
function get_matches_lower_bound() {
|
415
|
+
return MSet_get_matches_lower_bound($this->_cPtr);
|
416
|
+
}
|
417
|
+
|
418
|
+
function get_matches_estimated() {
|
419
|
+
return MSet_get_matches_estimated($this->_cPtr);
|
420
|
+
}
|
421
|
+
|
422
|
+
function get_matches_upper_bound() {
|
423
|
+
return MSet_get_matches_upper_bound($this->_cPtr);
|
424
|
+
}
|
425
|
+
|
426
|
+
function get_max_possible() {
|
427
|
+
return MSet_get_max_possible($this->_cPtr);
|
428
|
+
}
|
429
|
+
|
430
|
+
function get_max_attained() {
|
431
|
+
return MSet_get_max_attained($this->_cPtr);
|
432
|
+
}
|
433
|
+
|
434
|
+
function size() {
|
435
|
+
return MSet_size($this->_cPtr);
|
436
|
+
}
|
437
|
+
|
438
|
+
function is_empty() {
|
439
|
+
return MSet_is_empty($this->_cPtr);
|
440
|
+
}
|
441
|
+
|
442
|
+
function begin() {
|
443
|
+
$r=MSet_begin($this->_cPtr);
|
444
|
+
return is_resource($r) ? new XapianMSetIterator($r) : $r;
|
445
|
+
}
|
446
|
+
|
447
|
+
function end() {
|
448
|
+
$r=MSet_end($this->_cPtr);
|
449
|
+
return is_resource($r) ? new XapianMSetIterator($r) : $r;
|
450
|
+
}
|
451
|
+
|
452
|
+
function back() {
|
453
|
+
$r=MSet_back($this->_cPtr);
|
454
|
+
return is_resource($r) ? new XapianMSetIterator($r) : $r;
|
455
|
+
}
|
456
|
+
|
457
|
+
function get_hit($i) {
|
458
|
+
$r=MSet_get_hit($this->_cPtr,$i);
|
459
|
+
return is_resource($r) ? new XapianMSetIterator($r) : $r;
|
460
|
+
}
|
461
|
+
|
462
|
+
function get_document_percentage($i) {
|
463
|
+
return MSet_get_document_percentage($this->_cPtr,$i);
|
464
|
+
}
|
465
|
+
|
466
|
+
function get_document($i) {
|
467
|
+
$r=MSet_get_document($this->_cPtr,$i);
|
468
|
+
return is_resource($r) ? new XapianDocument($r) : $r;
|
469
|
+
}
|
470
|
+
|
471
|
+
function get_docid($i) {
|
472
|
+
return MSet_get_docid($this->_cPtr,$i);
|
473
|
+
}
|
474
|
+
|
475
|
+
function get_document_id($i) {
|
476
|
+
return MSet_get_document_id($this->_cPtr,$i);
|
477
|
+
}
|
478
|
+
|
479
|
+
function get_description() {
|
480
|
+
return MSet_get_description($this->_cPtr);
|
481
|
+
}
|
482
|
+
}
|
483
|
+
|
484
|
+
class XapianMSetIterator {
|
485
|
+
public $_cPtr=null;
|
486
|
+
|
487
|
+
function __construct($other=null) {
|
488
|
+
switch (func_num_args()) {
|
489
|
+
case 0: $r=new_MSetIterator(); break;
|
490
|
+
default: $r=new_MSetIterator($other);
|
491
|
+
}
|
492
|
+
$this->_cPtr=$r;
|
493
|
+
}
|
494
|
+
|
495
|
+
function get_docid() {
|
496
|
+
return MSetIterator_get_docid($this->_cPtr);
|
497
|
+
}
|
498
|
+
|
499
|
+
function next() {
|
500
|
+
MSetIterator_next($this->_cPtr);
|
501
|
+
}
|
502
|
+
|
503
|
+
function prev() {
|
504
|
+
MSetIterator_prev($this->_cPtr);
|
505
|
+
}
|
506
|
+
|
507
|
+
function equals($other) {
|
508
|
+
return MSetIterator_equals($this->_cPtr,$other);
|
509
|
+
}
|
510
|
+
|
511
|
+
function get_document() {
|
512
|
+
$r=MSetIterator_get_document($this->_cPtr);
|
513
|
+
return is_resource($r) ? new XapianDocument($r) : $r;
|
514
|
+
}
|
515
|
+
|
516
|
+
function get_rank() {
|
517
|
+
return MSetIterator_get_rank($this->_cPtr);
|
518
|
+
}
|
519
|
+
|
520
|
+
function get_weight() {
|
521
|
+
return MSetIterator_get_weight($this->_cPtr);
|
522
|
+
}
|
523
|
+
|
524
|
+
function get_collapse_key() {
|
525
|
+
return MSetIterator_get_collapse_key($this->_cPtr);
|
526
|
+
}
|
527
|
+
|
528
|
+
function get_collapse_count() {
|
529
|
+
return MSetIterator_get_collapse_count($this->_cPtr);
|
530
|
+
}
|
531
|
+
|
532
|
+
function get_percent() {
|
533
|
+
return MSetIterator_get_percent($this->_cPtr);
|
534
|
+
}
|
535
|
+
|
536
|
+
function get_description() {
|
537
|
+
return MSetIterator_get_description($this->_cPtr);
|
538
|
+
}
|
539
|
+
}
|
540
|
+
|
541
|
+
class XapianESet {
|
542
|
+
public $_cPtr=null;
|
543
|
+
|
544
|
+
function __construct($other=null) {
|
545
|
+
switch (func_num_args()) {
|
546
|
+
case 0: $r=new_ESet(); break;
|
547
|
+
default: $r=new_ESet($other);
|
548
|
+
}
|
549
|
+
$this->_cPtr=$r;
|
550
|
+
}
|
551
|
+
|
552
|
+
function get_ebound() {
|
553
|
+
return ESet_get_ebound($this->_cPtr);
|
554
|
+
}
|
555
|
+
|
556
|
+
function size() {
|
557
|
+
return ESet_size($this->_cPtr);
|
558
|
+
}
|
559
|
+
|
560
|
+
function is_empty() {
|
561
|
+
return ESet_is_empty($this->_cPtr);
|
562
|
+
}
|
563
|
+
|
564
|
+
function begin() {
|
565
|
+
$r=ESet_begin($this->_cPtr);
|
566
|
+
return is_resource($r) ? new XapianESetIterator($r) : $r;
|
567
|
+
}
|
568
|
+
|
569
|
+
function end() {
|
570
|
+
$r=ESet_end($this->_cPtr);
|
571
|
+
return is_resource($r) ? new XapianESetIterator($r) : $r;
|
572
|
+
}
|
573
|
+
|
574
|
+
function back() {
|
575
|
+
$r=ESet_back($this->_cPtr);
|
576
|
+
return is_resource($r) ? new XapianESetIterator($r) : $r;
|
577
|
+
}
|
578
|
+
|
579
|
+
function get_description() {
|
580
|
+
return ESet_get_description($this->_cPtr);
|
581
|
+
}
|
582
|
+
}
|
583
|
+
|
584
|
+
class XapianESetIterator {
|
585
|
+
public $_cPtr=null;
|
586
|
+
|
587
|
+
function __construct($other=null) {
|
588
|
+
switch (func_num_args()) {
|
589
|
+
case 0: $r=new_ESetIterator(); break;
|
590
|
+
default: $r=new_ESetIterator($other);
|
591
|
+
}
|
592
|
+
$this->_cPtr=$r;
|
593
|
+
}
|
594
|
+
|
595
|
+
function get_termname() {
|
596
|
+
return ESetIterator_get_termname($this->_cPtr);
|
597
|
+
}
|
598
|
+
|
599
|
+
function get_term() {
|
600
|
+
return ESetIterator_get_term($this->_cPtr);
|
601
|
+
}
|
602
|
+
|
603
|
+
function next() {
|
604
|
+
ESetIterator_next($this->_cPtr);
|
605
|
+
}
|
606
|
+
|
607
|
+
function prev() {
|
608
|
+
ESetIterator_prev($this->_cPtr);
|
609
|
+
}
|
610
|
+
|
611
|
+
function equals($other) {
|
612
|
+
return ESetIterator_equals($this->_cPtr,$other);
|
613
|
+
}
|
614
|
+
|
615
|
+
function get_weight() {
|
616
|
+
return ESetIterator_get_weight($this->_cPtr);
|
617
|
+
}
|
618
|
+
|
619
|
+
function get_description() {
|
620
|
+
return ESetIterator_get_description($this->_cPtr);
|
621
|
+
}
|
622
|
+
}
|
623
|
+
|
624
|
+
class XapianRSet {
|
625
|
+
public $_cPtr=null;
|
626
|
+
|
627
|
+
function __construct($other=null) {
|
628
|
+
switch (func_num_args()) {
|
629
|
+
case 0: $r=new_RSet(); break;
|
630
|
+
default: $r=new_RSet($other);
|
631
|
+
}
|
632
|
+
$this->_cPtr=$r;
|
633
|
+
}
|
634
|
+
|
635
|
+
function size() {
|
636
|
+
return RSet_size($this->_cPtr);
|
637
|
+
}
|
638
|
+
|
639
|
+
function is_empty() {
|
640
|
+
return RSet_is_empty($this->_cPtr);
|
641
|
+
}
|
642
|
+
|
643
|
+
function add_document($did_or_i) {
|
644
|
+
RSet_add_document($this->_cPtr,$did_or_i);
|
645
|
+
}
|
646
|
+
|
647
|
+
function remove_document($did_or_i) {
|
648
|
+
RSet_remove_document($this->_cPtr,$did_or_i);
|
649
|
+
}
|
650
|
+
|
651
|
+
function contains($did_or_i) {
|
652
|
+
return RSet_contains($this->_cPtr,$did_or_i);
|
653
|
+
}
|
654
|
+
|
655
|
+
function get_description() {
|
656
|
+
return RSet_get_description($this->_cPtr);
|
657
|
+
}
|
658
|
+
}
|
659
|
+
|
660
|
+
abstract class XapianMatchDecider {
|
661
|
+
public $_cPtr=null;
|
662
|
+
function __construct($h) {
|
663
|
+
$this->_cPtr=$h;
|
664
|
+
}
|
665
|
+
|
666
|
+
function apply($doc) {
|
667
|
+
return MatchDecider_apply($this->_cPtr,$doc);
|
668
|
+
}
|
669
|
+
}
|
670
|
+
|
671
|
+
class XapianEnquire {
|
672
|
+
public $_cPtr=null;
|
673
|
+
|
674
|
+
function __construct($databases) {
|
675
|
+
$this->_cPtr=new_Enquire($databases);
|
676
|
+
}
|
677
|
+
|
678
|
+
function set_query($query,$qlen=0) {
|
679
|
+
Enquire_set_query($this->_cPtr,$query,$qlen);
|
680
|
+
}
|
681
|
+
|
682
|
+
function get_query() {
|
683
|
+
$r=Enquire_get_query($this->_cPtr);
|
684
|
+
return is_resource($r) ? new XapianQuery($r) : $r;
|
685
|
+
}
|
686
|
+
|
687
|
+
function set_weighting_scheme($weight) {
|
688
|
+
Enquire_set_weighting_scheme($this->_cPtr,$weight);
|
689
|
+
}
|
690
|
+
|
691
|
+
function set_collapse_key($collapse_key) {
|
692
|
+
Enquire_set_collapse_key($this->_cPtr,$collapse_key);
|
693
|
+
}
|
694
|
+
|
695
|
+
const ASCENDING = 1;
|
696
|
+
|
697
|
+
const DESCENDING = 0;
|
698
|
+
|
699
|
+
const DONT_CARE = 2;
|
700
|
+
|
701
|
+
function set_docid_order($order) {
|
702
|
+
Enquire_set_docid_order($this->_cPtr,$order);
|
703
|
+
}
|
704
|
+
|
705
|
+
function set_cutoff($percent_cutoff,$weight_cutoff=0.0) {
|
706
|
+
Enquire_set_cutoff($this->_cPtr,$percent_cutoff,$weight_cutoff);
|
707
|
+
}
|
708
|
+
|
709
|
+
function set_sort_by_relevance() {
|
710
|
+
Enquire_set_sort_by_relevance($this->_cPtr);
|
711
|
+
}
|
712
|
+
|
713
|
+
function set_sort_by_value($sort_key,$ascending=true) {
|
714
|
+
Enquire_set_sort_by_value($this->_cPtr,$sort_key,$ascending);
|
715
|
+
}
|
716
|
+
|
717
|
+
function set_sort_by_value_then_relevance($sort_key,$ascending=true) {
|
718
|
+
Enquire_set_sort_by_value_then_relevance($this->_cPtr,$sort_key,$ascending);
|
719
|
+
}
|
720
|
+
|
721
|
+
function set_sort_by_relevance_then_value($sort_key,$ascending=true) {
|
722
|
+
Enquire_set_sort_by_relevance_then_value($this->_cPtr,$sort_key,$ascending);
|
723
|
+
}
|
724
|
+
|
725
|
+
function set_sort_by_key($sorter,$ascending=true) {
|
726
|
+
Enquire_set_sort_by_key($this->_cPtr,$sorter,$ascending);
|
727
|
+
}
|
728
|
+
|
729
|
+
function set_sort_by_key_then_relevance($sorter,$ascending=true) {
|
730
|
+
Enquire_set_sort_by_key_then_relevance($this->_cPtr,$sorter,$ascending);
|
731
|
+
}
|
732
|
+
|
733
|
+
function set_sort_by_relevance_then_key($sorter,$ascending=true) {
|
734
|
+
Enquire_set_sort_by_relevance_then_key($this->_cPtr,$sorter,$ascending);
|
735
|
+
}
|
736
|
+
|
737
|
+
const INCLUDE_QUERY_TERMS = Enquire_INCLUDE_QUERY_TERMS;
|
738
|
+
|
739
|
+
const USE_EXACT_TERMFREQ = Enquire_USE_EXACT_TERMFREQ;
|
740
|
+
|
741
|
+
function get_mset($first,$maxitems,$checkatleast_or_omrset=null,$omrset=null) {
|
742
|
+
switch (func_num_args()) {
|
743
|
+
case 2: $r=Enquire_get_mset($this->_cPtr,$first,$maxitems); break;
|
744
|
+
case 3: $r=Enquire_get_mset($this->_cPtr,$first,$maxitems,$checkatleast_or_omrset); break;
|
745
|
+
default: $r=Enquire_get_mset($this->_cPtr,$first,$maxitems,$checkatleast_or_omrset,$omrset);
|
746
|
+
}
|
747
|
+
return is_resource($r) ? new XapianMSet($r) : $r;
|
748
|
+
}
|
749
|
+
|
750
|
+
function get_eset($maxitems,$omrset,$flags=0,$k=1.0) {
|
751
|
+
$r=Enquire_get_eset($this->_cPtr,$maxitems,$omrset,$flags,$k);
|
752
|
+
return is_resource($r) ? new XapianESet($r) : $r;
|
753
|
+
}
|
754
|
+
|
755
|
+
function get_matching_terms_begin($did_or_i) {
|
756
|
+
$r=Enquire_get_matching_terms_begin($this->_cPtr,$did_or_i);
|
757
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
758
|
+
}
|
759
|
+
|
760
|
+
function get_matching_terms_end($did_or_i) {
|
761
|
+
$r=Enquire_get_matching_terms_end($this->_cPtr,$did_or_i);
|
762
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
763
|
+
}
|
764
|
+
|
765
|
+
function get_matching_terms($hit) {
|
766
|
+
return Enquire_get_matching_terms($this->_cPtr,$hit);
|
767
|
+
}
|
768
|
+
|
769
|
+
function get_description() {
|
770
|
+
return Enquire_get_description($this->_cPtr);
|
771
|
+
}
|
772
|
+
}
|
773
|
+
|
774
|
+
abstract class XapianWeight {
|
775
|
+
public $_cPtr=null;
|
776
|
+
function __construct($h) {
|
777
|
+
$this->_cPtr=$h;
|
778
|
+
}
|
779
|
+
|
780
|
+
function name() {
|
781
|
+
return Weight_name($this->_cPtr);
|
782
|
+
}
|
783
|
+
|
784
|
+
function serialise() {
|
785
|
+
return Weight_serialise($this->_cPtr);
|
786
|
+
}
|
787
|
+
|
788
|
+
function unserialise($s) {
|
789
|
+
$r=Weight_unserialise($this->_cPtr,$s);
|
790
|
+
return is_resource($r) ? new XapianWeight($r) : $r;
|
791
|
+
}
|
792
|
+
|
793
|
+
function get_sumpart($wdf,$len) {
|
794
|
+
return Weight_get_sumpart($this->_cPtr,$wdf,$len);
|
795
|
+
}
|
796
|
+
|
797
|
+
function get_maxpart() {
|
798
|
+
return Weight_get_maxpart($this->_cPtr);
|
799
|
+
}
|
800
|
+
|
801
|
+
function get_sumextra($len) {
|
802
|
+
return Weight_get_sumextra($this->_cPtr,$len);
|
803
|
+
}
|
804
|
+
|
805
|
+
function get_maxextra() {
|
806
|
+
return Weight_get_maxextra($this->_cPtr);
|
807
|
+
}
|
808
|
+
|
809
|
+
function get_sumpart_needs_doclength() {
|
810
|
+
return Weight_get_sumpart_needs_doclength($this->_cPtr);
|
811
|
+
}
|
812
|
+
}
|
813
|
+
|
814
|
+
class XapianBoolWeight extends XapianWeight {
|
815
|
+
public $_cPtr=null;
|
816
|
+
|
817
|
+
function clone_object() {
|
818
|
+
$r=BoolWeight_clone_object($this->_cPtr);
|
819
|
+
return is_resource($r) ? new XapianBoolWeight($r) : $r;
|
820
|
+
}
|
821
|
+
|
822
|
+
function __construct() {
|
823
|
+
$this->_cPtr=new_BoolWeight();
|
824
|
+
}
|
825
|
+
|
826
|
+
function name() {
|
827
|
+
return BoolWeight_name($this->_cPtr);
|
828
|
+
}
|
829
|
+
|
830
|
+
function serialise() {
|
831
|
+
return BoolWeight_serialise($this->_cPtr);
|
832
|
+
}
|
833
|
+
|
834
|
+
function unserialise($s) {
|
835
|
+
$r=BoolWeight_unserialise($this->_cPtr,$s);
|
836
|
+
return is_resource($r) ? new XapianBoolWeight($r) : $r;
|
837
|
+
}
|
838
|
+
|
839
|
+
function get_sumpart($wdf,$len) {
|
840
|
+
return BoolWeight_get_sumpart($this->_cPtr,$wdf,$len);
|
841
|
+
}
|
842
|
+
|
843
|
+
function get_maxpart() {
|
844
|
+
return BoolWeight_get_maxpart($this->_cPtr);
|
845
|
+
}
|
846
|
+
|
847
|
+
function get_sumextra($len) {
|
848
|
+
return BoolWeight_get_sumextra($this->_cPtr,$len);
|
849
|
+
}
|
850
|
+
|
851
|
+
function get_maxextra() {
|
852
|
+
return BoolWeight_get_maxextra($this->_cPtr);
|
853
|
+
}
|
854
|
+
|
855
|
+
function get_sumpart_needs_doclength() {
|
856
|
+
return BoolWeight_get_sumpart_needs_doclength($this->_cPtr);
|
857
|
+
}
|
858
|
+
}
|
859
|
+
|
860
|
+
class XapianBM25Weight extends XapianWeight {
|
861
|
+
public $_cPtr=null;
|
862
|
+
|
863
|
+
function __construct($k1_=null,$k2_=null,$k3_=null,$b_=null,$min_normlen_=null) {
|
864
|
+
switch (func_num_args()) {
|
865
|
+
case 0: $r=new_BM25Weight(); break;
|
866
|
+
case 1: $r=new_BM25Weight($k1_); break;
|
867
|
+
case 2: $r=new_BM25Weight($k1_,$k2_); break;
|
868
|
+
case 3: $r=new_BM25Weight($k1_,$k2_,$k3_); break;
|
869
|
+
case 4: $r=new_BM25Weight($k1_,$k2_,$k3_,$b_); break;
|
870
|
+
default: $r=new_BM25Weight($k1_,$k2_,$k3_,$b_,$min_normlen_);
|
871
|
+
}
|
872
|
+
$this->_cPtr=$r;
|
873
|
+
}
|
874
|
+
|
875
|
+
function clone_object() {
|
876
|
+
$r=BM25Weight_clone_object($this->_cPtr);
|
877
|
+
return is_resource($r) ? new XapianBM25Weight($r) : $r;
|
878
|
+
}
|
879
|
+
|
880
|
+
function name() {
|
881
|
+
return BM25Weight_name($this->_cPtr);
|
882
|
+
}
|
883
|
+
|
884
|
+
function serialise() {
|
885
|
+
return BM25Weight_serialise($this->_cPtr);
|
886
|
+
}
|
887
|
+
|
888
|
+
function unserialise($s) {
|
889
|
+
$r=BM25Weight_unserialise($this->_cPtr,$s);
|
890
|
+
return is_resource($r) ? new XapianBM25Weight($r) : $r;
|
891
|
+
}
|
892
|
+
|
893
|
+
function get_sumpart($wdf,$len) {
|
894
|
+
return BM25Weight_get_sumpart($this->_cPtr,$wdf,$len);
|
895
|
+
}
|
896
|
+
|
897
|
+
function get_maxpart() {
|
898
|
+
return BM25Weight_get_maxpart($this->_cPtr);
|
899
|
+
}
|
900
|
+
|
901
|
+
function get_sumextra($len) {
|
902
|
+
return BM25Weight_get_sumextra($this->_cPtr,$len);
|
903
|
+
}
|
904
|
+
|
905
|
+
function get_maxextra() {
|
906
|
+
return BM25Weight_get_maxextra($this->_cPtr);
|
907
|
+
}
|
908
|
+
|
909
|
+
function get_sumpart_needs_doclength() {
|
910
|
+
return BM25Weight_get_sumpart_needs_doclength($this->_cPtr);
|
911
|
+
}
|
912
|
+
}
|
913
|
+
|
914
|
+
class XapianTradWeight extends XapianWeight {
|
915
|
+
public $_cPtr=null;
|
916
|
+
|
917
|
+
function __construct($k=null) {
|
918
|
+
switch (func_num_args()) {
|
919
|
+
case 0: $r=new_TradWeight(); break;
|
920
|
+
default: $r=new_TradWeight($k);
|
921
|
+
}
|
922
|
+
$this->_cPtr=$r;
|
923
|
+
}
|
924
|
+
|
925
|
+
function clone_object() {
|
926
|
+
$r=TradWeight_clone_object($this->_cPtr);
|
927
|
+
return is_resource($r) ? new XapianTradWeight($r) : $r;
|
928
|
+
}
|
929
|
+
|
930
|
+
function name() {
|
931
|
+
return TradWeight_name($this->_cPtr);
|
932
|
+
}
|
933
|
+
|
934
|
+
function serialise() {
|
935
|
+
return TradWeight_serialise($this->_cPtr);
|
936
|
+
}
|
937
|
+
|
938
|
+
function unserialise($s) {
|
939
|
+
$r=TradWeight_unserialise($this->_cPtr,$s);
|
940
|
+
return is_resource($r) ? new XapianTradWeight($r) : $r;
|
941
|
+
}
|
942
|
+
|
943
|
+
function get_sumpart($wdf,$len) {
|
944
|
+
return TradWeight_get_sumpart($this->_cPtr,$wdf,$len);
|
945
|
+
}
|
946
|
+
|
947
|
+
function get_maxpart() {
|
948
|
+
return TradWeight_get_maxpart($this->_cPtr);
|
949
|
+
}
|
950
|
+
|
951
|
+
function get_sumextra($len) {
|
952
|
+
return TradWeight_get_sumextra($this->_cPtr,$len);
|
953
|
+
}
|
954
|
+
|
955
|
+
function get_maxextra() {
|
956
|
+
return TradWeight_get_maxextra($this->_cPtr);
|
957
|
+
}
|
958
|
+
|
959
|
+
function get_sumpart_needs_doclength() {
|
960
|
+
return TradWeight_get_sumpart_needs_doclength($this->_cPtr);
|
961
|
+
}
|
962
|
+
}
|
963
|
+
|
964
|
+
class XapianDatabase {
|
965
|
+
public $_cPtr=null;
|
966
|
+
|
967
|
+
function add_database($database) {
|
968
|
+
Database_add_database($this->_cPtr,$database);
|
969
|
+
}
|
970
|
+
|
971
|
+
function __construct($path_or_other=null) {
|
972
|
+
switch (func_num_args()) {
|
973
|
+
case 0: $r=new_Database(); break;
|
974
|
+
default: $r=new_Database($path_or_other);
|
975
|
+
}
|
976
|
+
$this->_cPtr=$r;
|
977
|
+
}
|
978
|
+
|
979
|
+
function reopen() {
|
980
|
+
Database_reopen($this->_cPtr);
|
981
|
+
}
|
982
|
+
|
983
|
+
function get_description() {
|
984
|
+
return Database_get_description($this->_cPtr);
|
985
|
+
}
|
986
|
+
|
987
|
+
function postlist_begin($tname) {
|
988
|
+
$r=Database_postlist_begin($this->_cPtr,$tname);
|
989
|
+
return is_resource($r) ? new XapianPostingIterator($r) : $r;
|
990
|
+
}
|
991
|
+
|
992
|
+
function postlist_end($tname) {
|
993
|
+
$r=Database_postlist_end($this->_cPtr,$tname);
|
994
|
+
return is_resource($r) ? new XapianPostingIterator($r) : $r;
|
995
|
+
}
|
996
|
+
|
997
|
+
function termlist_begin($did) {
|
998
|
+
$r=Database_termlist_begin($this->_cPtr,$did);
|
999
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
function termlist_end($did) {
|
1003
|
+
$r=Database_termlist_end($this->_cPtr,$did);
|
1004
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
function positionlist_begin($did,$tname) {
|
1008
|
+
$r=Database_positionlist_begin($this->_cPtr,$did,$tname);
|
1009
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
function positionlist_end($did,$tname) {
|
1013
|
+
$r=Database_positionlist_end($this->_cPtr,$did,$tname);
|
1014
|
+
return is_resource($r) ? new XapianPositionIterator($r) : $r;
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
function allterms_begin($prefix=null) {
|
1018
|
+
switch (func_num_args()) {
|
1019
|
+
case 0: $r=Database_allterms_begin($this->_cPtr); break;
|
1020
|
+
default: $r=Database_allterms_begin($this->_cPtr,$prefix);
|
1021
|
+
}
|
1022
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
function allterms_end($prefix=null) {
|
1026
|
+
switch (func_num_args()) {
|
1027
|
+
case 0: $r=Database_allterms_end($this->_cPtr); break;
|
1028
|
+
default: $r=Database_allterms_end($this->_cPtr,$prefix);
|
1029
|
+
}
|
1030
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
function get_doccount() {
|
1034
|
+
return Database_get_doccount($this->_cPtr);
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
function get_lastdocid() {
|
1038
|
+
return Database_get_lastdocid($this->_cPtr);
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
function get_avlength() {
|
1042
|
+
return Database_get_avlength($this->_cPtr);
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
function get_termfreq($tname) {
|
1046
|
+
return Database_get_termfreq($this->_cPtr,$tname);
|
1047
|
+
}
|
1048
|
+
|
1049
|
+
function term_exists($tname) {
|
1050
|
+
return Database_term_exists($this->_cPtr,$tname);
|
1051
|
+
}
|
1052
|
+
|
1053
|
+
function get_collection_freq($tname) {
|
1054
|
+
return Database_get_collection_freq($this->_cPtr,$tname);
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
function get_doclength($docid) {
|
1058
|
+
return Database_get_doclength($this->_cPtr,$docid);
|
1059
|
+
}
|
1060
|
+
|
1061
|
+
function keep_alive() {
|
1062
|
+
Database_keep_alive($this->_cPtr);
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
function get_document($did) {
|
1066
|
+
$r=Database_get_document($this->_cPtr,$did);
|
1067
|
+
return is_resource($r) ? new XapianDocument($r) : $r;
|
1068
|
+
}
|
1069
|
+
|
1070
|
+
function get_spelling_suggestion($word,$max_edit_distance=2) {
|
1071
|
+
return Database_get_spelling_suggestion($this->_cPtr,$word,$max_edit_distance);
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
function spellings_begin() {
|
1075
|
+
$r=Database_spellings_begin($this->_cPtr);
|
1076
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1077
|
+
}
|
1078
|
+
|
1079
|
+
function spellings_end() {
|
1080
|
+
$r=Database_spellings_end($this->_cPtr);
|
1081
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1082
|
+
}
|
1083
|
+
|
1084
|
+
function synonyms_begin($term) {
|
1085
|
+
$r=Database_synonyms_begin($this->_cPtr,$term);
|
1086
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
function synonyms_end($arg1) {
|
1090
|
+
$r=Database_synonyms_end($this->_cPtr,$arg1);
|
1091
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1092
|
+
}
|
1093
|
+
|
1094
|
+
function synonym_keys_begin($prefix=null) {
|
1095
|
+
switch (func_num_args()) {
|
1096
|
+
case 0: $r=Database_synonym_keys_begin($this->_cPtr); break;
|
1097
|
+
default: $r=Database_synonym_keys_begin($this->_cPtr,$prefix);
|
1098
|
+
}
|
1099
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
function synonym_keys_end($prefix=null) {
|
1103
|
+
switch (func_num_args()) {
|
1104
|
+
case 0: $r=Database_synonym_keys_end($this->_cPtr); break;
|
1105
|
+
default: $r=Database_synonym_keys_end($this->_cPtr,$prefix);
|
1106
|
+
}
|
1107
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1108
|
+
}
|
1109
|
+
|
1110
|
+
function get_metadata($key) {
|
1111
|
+
return Database_get_metadata($this->_cPtr,$key);
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
function metadata_keys_begin($prefix=null) {
|
1115
|
+
switch (func_num_args()) {
|
1116
|
+
case 0: $r=Database_metadata_keys_begin($this->_cPtr); break;
|
1117
|
+
default: $r=Database_metadata_keys_begin($this->_cPtr,$prefix);
|
1118
|
+
}
|
1119
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
function metadata_keys_end($prefix=null) {
|
1123
|
+
switch (func_num_args()) {
|
1124
|
+
case 0: $r=Database_metadata_keys_end($this->_cPtr); break;
|
1125
|
+
default: $r=Database_metadata_keys_end($this->_cPtr,$prefix);
|
1126
|
+
}
|
1127
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1128
|
+
}
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
class XapianWritableDatabase extends XapianDatabase {
|
1132
|
+
public $_cPtr=null;
|
1133
|
+
|
1134
|
+
function __construct($path_or_other=null,$action=null) {
|
1135
|
+
switch (func_num_args()) {
|
1136
|
+
case 0: $r=new_WritableDatabase(); break;
|
1137
|
+
case 1: $r=new_WritableDatabase($path_or_other); break;
|
1138
|
+
default: $r=new_WritableDatabase($path_or_other,$action);
|
1139
|
+
}
|
1140
|
+
$this->_cPtr=$r;
|
1141
|
+
}
|
1142
|
+
|
1143
|
+
function flush() {
|
1144
|
+
WritableDatabase_flush($this->_cPtr);
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
function begin_transaction($flushed=true) {
|
1148
|
+
WritableDatabase_begin_transaction($this->_cPtr,$flushed);
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
function commit_transaction() {
|
1152
|
+
WritableDatabase_commit_transaction($this->_cPtr);
|
1153
|
+
}
|
1154
|
+
|
1155
|
+
function cancel_transaction() {
|
1156
|
+
WritableDatabase_cancel_transaction($this->_cPtr);
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
function add_document($document) {
|
1160
|
+
return WritableDatabase_add_document($this->_cPtr,$document);
|
1161
|
+
}
|
1162
|
+
|
1163
|
+
function delete_document($did_or_unique_term) {
|
1164
|
+
WritableDatabase_delete_document($this->_cPtr,$did_or_unique_term);
|
1165
|
+
}
|
1166
|
+
|
1167
|
+
function replace_document($did_or_unique_term,$document) {
|
1168
|
+
return WritableDatabase_replace_document($this->_cPtr,$did_or_unique_term,$document);
|
1169
|
+
}
|
1170
|
+
|
1171
|
+
function add_spelling($word,$freqinc=1) {
|
1172
|
+
WritableDatabase_add_spelling($this->_cPtr,$word,$freqinc);
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
function remove_spelling($word,$freqdec=1) {
|
1176
|
+
WritableDatabase_remove_spelling($this->_cPtr,$word,$freqdec);
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
function add_synonym($term,$synonym) {
|
1180
|
+
WritableDatabase_add_synonym($this->_cPtr,$term,$synonym);
|
1181
|
+
}
|
1182
|
+
|
1183
|
+
function remove_synonym($term,$synonym) {
|
1184
|
+
WritableDatabase_remove_synonym($this->_cPtr,$term,$synonym);
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
function clear_synonyms($term) {
|
1188
|
+
WritableDatabase_clear_synonyms($this->_cPtr,$term);
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
function set_metadata($key,$value) {
|
1192
|
+
WritableDatabase_set_metadata($this->_cPtr,$key,$value);
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
function get_description() {
|
1196
|
+
return WritableDatabase_get_description($this->_cPtr);
|
1197
|
+
}
|
1198
|
+
}
|
1199
|
+
|
1200
|
+
class XapianQuery {
|
1201
|
+
public $_cPtr=null;
|
1202
|
+
|
1203
|
+
const OP_AND = 0;
|
1204
|
+
|
1205
|
+
const OP_OR = Query_OP_OR;
|
1206
|
+
|
1207
|
+
const OP_AND_NOT = Query_OP_AND_NOT;
|
1208
|
+
|
1209
|
+
const OP_XOR = Query_OP_XOR;
|
1210
|
+
|
1211
|
+
const OP_AND_MAYBE = Query_OP_AND_MAYBE;
|
1212
|
+
|
1213
|
+
const OP_FILTER = Query_OP_FILTER;
|
1214
|
+
|
1215
|
+
const OP_NEAR = Query_OP_NEAR;
|
1216
|
+
|
1217
|
+
const OP_PHRASE = Query_OP_PHRASE;
|
1218
|
+
|
1219
|
+
const OP_VALUE_RANGE = Query_OP_VALUE_RANGE;
|
1220
|
+
|
1221
|
+
const OP_SCALE_WEIGHT = Query_OP_SCALE_WEIGHT;
|
1222
|
+
|
1223
|
+
const OP_ELITE_SET = 10;
|
1224
|
+
|
1225
|
+
const OP_VALUE_GE = Query_OP_VALUE_GE;
|
1226
|
+
|
1227
|
+
const OP_VALUE_LE = Query_OP_VALUE_LE;
|
1228
|
+
|
1229
|
+
function __construct($tname_or_op__or_copyme_or_op=null,$wqf_or_left_or_valno_or_subqs_or_q=null,$term_pos_or_right_or_begin_or_value_or_param_or_parameter=null,$end=null) {
|
1230
|
+
switch (func_num_args()) {
|
1231
|
+
case 0: $r=new_Query(); break;
|
1232
|
+
case 1: $r=new_Query($tname_or_op__or_copyme_or_op); break;
|
1233
|
+
case 2: $r=new_Query($tname_or_op__or_copyme_or_op,$wqf_or_left_or_valno_or_subqs_or_q); break;
|
1234
|
+
case 3: $r=new_Query($tname_or_op__or_copyme_or_op,$wqf_or_left_or_valno_or_subqs_or_q,$term_pos_or_right_or_begin_or_value_or_param_or_parameter); break;
|
1235
|
+
default: $r=new_Query($tname_or_op__or_copyme_or_op,$wqf_or_left_or_valno_or_subqs_or_q,$term_pos_or_right_or_begin_or_value_or_param_or_parameter,$end);
|
1236
|
+
}
|
1237
|
+
$this->_cPtr=$r;
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
function get_length() {
|
1241
|
+
return Query_get_length($this->_cPtr);
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
function get_terms_begin() {
|
1245
|
+
$r=Query_get_terms_begin($this->_cPtr);
|
1246
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1247
|
+
}
|
1248
|
+
|
1249
|
+
function get_terms_end() {
|
1250
|
+
$r=Query_get_terms_end($this->_cPtr);
|
1251
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
function is_empty() {
|
1255
|
+
return Query_is_empty($this->_cPtr);
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
function get_description() {
|
1259
|
+
return Query_get_description($this->_cPtr);
|
1260
|
+
}
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
abstract class XapianStopper {
|
1264
|
+
public $_cPtr=null;
|
1265
|
+
function __construct($h) {
|
1266
|
+
$this->_cPtr=$h;
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
function apply($term) {
|
1270
|
+
return Stopper_apply($this->_cPtr,$term);
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
function get_description() {
|
1274
|
+
return Stopper_get_description($this->_cPtr);
|
1275
|
+
}
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
class XapianSimpleStopper extends XapianStopper {
|
1279
|
+
public $_cPtr=null;
|
1280
|
+
|
1281
|
+
function __construct() {
|
1282
|
+
$this->_cPtr=new_SimpleStopper();
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
function add($word) {
|
1286
|
+
SimpleStopper_add($this->_cPtr,$word);
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
function apply($term) {
|
1290
|
+
return SimpleStopper_apply($this->_cPtr,$term);
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
function get_description() {
|
1294
|
+
return SimpleStopper_get_description($this->_cPtr);
|
1295
|
+
}
|
1296
|
+
}
|
1297
|
+
|
1298
|
+
abstract class XapianValueRangeProcessor {
|
1299
|
+
public $_cPtr=null;
|
1300
|
+
function __construct($h) {
|
1301
|
+
$this->_cPtr=$h;
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
function apply($begin,$end) {
|
1305
|
+
return ValueRangeProcessor_apply($this->_cPtr,$begin,$end);
|
1306
|
+
}
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
class XapianStringValueRangeProcessor extends XapianValueRangeProcessor {
|
1310
|
+
public $_cPtr=null;
|
1311
|
+
|
1312
|
+
function __construct($valno_) {
|
1313
|
+
$this->_cPtr=new_StringValueRangeProcessor($valno_);
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
function apply($arg1,$arg2) {
|
1317
|
+
return StringValueRangeProcessor_apply($this->_cPtr,$arg1,$arg2);
|
1318
|
+
}
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
class XapianDateValueRangeProcessor extends XapianValueRangeProcessor {
|
1322
|
+
public $_cPtr=null;
|
1323
|
+
|
1324
|
+
function __construct($valno_,$prefer_mdy_=false,$epoch_year_=1970) {
|
1325
|
+
$this->_cPtr=new_DateValueRangeProcessor($valno_,$prefer_mdy_,$epoch_year_);
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
function apply($begin,$end) {
|
1329
|
+
return DateValueRangeProcessor_apply($this->_cPtr,$begin,$end);
|
1330
|
+
}
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
class XapianNumberValueRangeProcessor extends XapianValueRangeProcessor {
|
1334
|
+
public $_cPtr=null;
|
1335
|
+
|
1336
|
+
function __construct($valno_,$str_=null,$prefix_=true) {
|
1337
|
+
switch (func_num_args()) {
|
1338
|
+
case 1: $r=new_NumberValueRangeProcessor($valno_); break;
|
1339
|
+
default: $r=new_NumberValueRangeProcessor($valno_,$str_,$prefix_);
|
1340
|
+
}
|
1341
|
+
$this->_cPtr=$r;
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
function apply($begin,$end) {
|
1345
|
+
return NumberValueRangeProcessor_apply($this->_cPtr,$begin,$end);
|
1346
|
+
}
|
1347
|
+
}
|
1348
|
+
|
1349
|
+
class XapianQueryParser {
|
1350
|
+
public $_cPtr=null;
|
1351
|
+
|
1352
|
+
const FLAG_BOOLEAN = 1;
|
1353
|
+
|
1354
|
+
const FLAG_PHRASE = 2;
|
1355
|
+
|
1356
|
+
const FLAG_LOVEHATE = 4;
|
1357
|
+
|
1358
|
+
const FLAG_BOOLEAN_ANY_CASE = 8;
|
1359
|
+
|
1360
|
+
const FLAG_WILDCARD = 16;
|
1361
|
+
|
1362
|
+
const FLAG_PURE_NOT = 32;
|
1363
|
+
|
1364
|
+
const FLAG_PARTIAL = 64;
|
1365
|
+
|
1366
|
+
const FLAG_SPELLING_CORRECTION = 128;
|
1367
|
+
|
1368
|
+
const FLAG_SYNONYM = 256;
|
1369
|
+
|
1370
|
+
const FLAG_AUTO_SYNONYMS = 512;
|
1371
|
+
|
1372
|
+
const FLAG_AUTO_MULTIWORD_SYNONYMS = QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS;
|
1373
|
+
|
1374
|
+
const FLAG_DEFAULT = QueryParser_FLAG_DEFAULT;
|
1375
|
+
|
1376
|
+
const STEM_NONE = 0;
|
1377
|
+
|
1378
|
+
const STEM_SOME = QueryParser_STEM_SOME;
|
1379
|
+
|
1380
|
+
const STEM_ALL = QueryParser_STEM_ALL;
|
1381
|
+
|
1382
|
+
function __construct() {
|
1383
|
+
$this->_cPtr=new_QueryParser();
|
1384
|
+
}
|
1385
|
+
|
1386
|
+
function set_stemmer($stemmer) {
|
1387
|
+
QueryParser_set_stemmer($this->_cPtr,$stemmer);
|
1388
|
+
}
|
1389
|
+
|
1390
|
+
function set_stemming_strategy($strategy) {
|
1391
|
+
QueryParser_set_stemming_strategy($this->_cPtr,$strategy);
|
1392
|
+
}
|
1393
|
+
|
1394
|
+
function set_stopper($stop=null) {
|
1395
|
+
QueryParser_set_stopper($this->_cPtr,$stop);
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
function set_default_op($default_op) {
|
1399
|
+
QueryParser_set_default_op($this->_cPtr,$default_op);
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
function get_default_op() {
|
1403
|
+
return QueryParser_get_default_op($this->_cPtr);
|
1404
|
+
}
|
1405
|
+
|
1406
|
+
function set_database($db) {
|
1407
|
+
QueryParser_set_database($this->_cPtr,$db);
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
function parse_query($query_string,$flags=null,$default_prefix=null) {
|
1411
|
+
switch (func_num_args()) {
|
1412
|
+
case 1: $r=QueryParser_parse_query($this->_cPtr,$query_string); break;
|
1413
|
+
case 2: $r=QueryParser_parse_query($this->_cPtr,$query_string,$flags); break;
|
1414
|
+
default: $r=QueryParser_parse_query($this->_cPtr,$query_string,$flags,$default_prefix);
|
1415
|
+
}
|
1416
|
+
return is_resource($r) ? new XapianQuery($r) : $r;
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
function add_prefix($field,$prefix) {
|
1420
|
+
QueryParser_add_prefix($this->_cPtr,$field,$prefix);
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
function add_boolean_prefix($field,$prefix) {
|
1424
|
+
QueryParser_add_boolean_prefix($this->_cPtr,$field,$prefix);
|
1425
|
+
}
|
1426
|
+
|
1427
|
+
function stoplist_begin() {
|
1428
|
+
$r=QueryParser_stoplist_begin($this->_cPtr);
|
1429
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
function stoplist_end() {
|
1433
|
+
$r=QueryParser_stoplist_end($this->_cPtr);
|
1434
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1435
|
+
}
|
1436
|
+
|
1437
|
+
function unstem_begin($term) {
|
1438
|
+
$r=QueryParser_unstem_begin($this->_cPtr,$term);
|
1439
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1440
|
+
}
|
1441
|
+
|
1442
|
+
function unstem_end($arg1) {
|
1443
|
+
$r=QueryParser_unstem_end($this->_cPtr,$arg1);
|
1444
|
+
return is_resource($r) ? new XapianTermIterator($r) : $r;
|
1445
|
+
}
|
1446
|
+
|
1447
|
+
function add_valuerangeprocessor($vrproc) {
|
1448
|
+
QueryParser_add_valuerangeprocessor($this->_cPtr,$vrproc);
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
function get_corrected_query_string() {
|
1452
|
+
return QueryParser_get_corrected_query_string($this->_cPtr);
|
1453
|
+
}
|
1454
|
+
|
1455
|
+
function get_description() {
|
1456
|
+
return QueryParser_get_description($this->_cPtr);
|
1457
|
+
}
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
class XapianStem {
|
1461
|
+
public $_cPtr=null;
|
1462
|
+
|
1463
|
+
function __construct($language) {
|
1464
|
+
$this->_cPtr=new_Stem($language);
|
1465
|
+
}
|
1466
|
+
|
1467
|
+
function apply($word) {
|
1468
|
+
return Stem_apply($this->_cPtr,$word);
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
function get_description() {
|
1472
|
+
return Stem_get_description($this->_cPtr);
|
1473
|
+
}
|
1474
|
+
|
1475
|
+
static function get_available_languages() {
|
1476
|
+
return Stem_get_available_languages();
|
1477
|
+
}
|
1478
|
+
}
|
1479
|
+
|
1480
|
+
class XapianTermGenerator {
|
1481
|
+
public $_cPtr=null;
|
1482
|
+
|
1483
|
+
function __construct() {
|
1484
|
+
$this->_cPtr=new_TermGenerator();
|
1485
|
+
}
|
1486
|
+
|
1487
|
+
function set_stemmer($stemmer) {
|
1488
|
+
TermGenerator_set_stemmer($this->_cPtr,$stemmer);
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
function set_stopper($stop=null) {
|
1492
|
+
TermGenerator_set_stopper($this->_cPtr,$stop);
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
function set_document($doc) {
|
1496
|
+
TermGenerator_set_document($this->_cPtr,$doc);
|
1497
|
+
}
|
1498
|
+
|
1499
|
+
function get_document() {
|
1500
|
+
$r=TermGenerator_get_document($this->_cPtr);
|
1501
|
+
return is_resource($r) ? new XapianDocument($r) : $r;
|
1502
|
+
}
|
1503
|
+
|
1504
|
+
function set_database($db) {
|
1505
|
+
TermGenerator_set_database($this->_cPtr,$db);
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
const FLAG_SPELLING = 128;
|
1509
|
+
|
1510
|
+
function set_flags($toggle,$mask=null) {
|
1511
|
+
switch (func_num_args()) {
|
1512
|
+
case 1: $r=TermGenerator_set_flags($this->_cPtr,$toggle); break;
|
1513
|
+
default: $r=TermGenerator_set_flags($this->_cPtr,$toggle,$mask);
|
1514
|
+
}
|
1515
|
+
return $r;
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
function index_text($text,$weight=1,$prefix=null) {
|
1519
|
+
switch (func_num_args()) {
|
1520
|
+
case 1: case 2: TermGenerator_index_text($this->_cPtr,$text,$weight); break;
|
1521
|
+
default: TermGenerator_index_text($this->_cPtr,$text,$weight,$prefix);
|
1522
|
+
}
|
1523
|
+
}
|
1524
|
+
|
1525
|
+
function index_text_without_positions($text,$weight=1,$prefix=null) {
|
1526
|
+
switch (func_num_args()) {
|
1527
|
+
case 1: case 2: TermGenerator_index_text_without_positions($this->_cPtr,$text,$weight); break;
|
1528
|
+
default: TermGenerator_index_text_without_positions($this->_cPtr,$text,$weight,$prefix);
|
1529
|
+
}
|
1530
|
+
}
|
1531
|
+
|
1532
|
+
function increase_termpos($delta=100) {
|
1533
|
+
TermGenerator_increase_termpos($this->_cPtr,$delta);
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
function get_termpos() {
|
1537
|
+
return TermGenerator_get_termpos($this->_cPtr);
|
1538
|
+
}
|
1539
|
+
|
1540
|
+
function set_termpos($termpos) {
|
1541
|
+
TermGenerator_set_termpos($this->_cPtr,$termpos);
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
function get_description() {
|
1545
|
+
return TermGenerator_get_description($this->_cPtr);
|
1546
|
+
}
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
class XapianMultiValueSorter {
|
1550
|
+
public $_cPtr=null;
|
1551
|
+
|
1552
|
+
function __construct() {
|
1553
|
+
$this->_cPtr=new_MultiValueSorter();
|
1554
|
+
}
|
1555
|
+
|
1556
|
+
function apply($doc) {
|
1557
|
+
return MultiValueSorter_apply($this->_cPtr,$doc);
|
1558
|
+
}
|
1559
|
+
|
1560
|
+
function add($valno,$forward=true) {
|
1561
|
+
MultiValueSorter_add($this->_cPtr,$valno,$forward);
|
1562
|
+
}
|
1563
|
+
}
|
1564
|
+
|
1565
|
+
|
1566
|
+
?>
|