1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.13
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10 
11 namespace Xapian {
12 
13 public class Enquire : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16 
Enquire(global::System.IntPtr cPtr, bool cMemoryOwn)17   internal Enquire(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21 
getCPtr(Enquire obj)22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Enquire obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25 
~Enquire()26   ~Enquire() {
27     Dispose();
28   }
29 
Dispose()30   public virtual void Dispose() {
31     lock(this) {
32       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33         if (swigCMemOwn) {
34           swigCMemOwn = false;
35           XapianPINVOKE.delete_Enquire(swigCPtr);
36         }
37         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38       }
39       global::System.GC.SuppressFinalize(this);
40     }
41   }
42 
Enquire(Database database)43   public Enquire(Database database) : this(XapianPINVOKE.new_Enquire(Database.getCPtr(database)), true) {
44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
45   }
46 
SetQuery(Query query, uint qlen)47   public void SetQuery(Query query, uint qlen) {
48     XapianPINVOKE.Enquire_SetQuery__SWIG_0(swigCPtr, Query.getCPtr(query), qlen);
49     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
50   }
51 
SetQuery(Query query)52   public void SetQuery(Query query) {
53     XapianPINVOKE.Enquire_SetQuery__SWIG_1(swigCPtr, Query.getCPtr(query));
54     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
55   }
56 
GetQuery()57   public Query GetQuery() {
58     Query ret = new Query(XapianPINVOKE.Enquire_GetQuery(swigCPtr), false);
59     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
60     return ret;
61   }
62 
AddMatchspy(MatchSpy spy)63   public void AddMatchspy(MatchSpy spy) {
64     XapianPINVOKE.Enquire_AddMatchspy(swigCPtr, MatchSpy.getCPtr(spy));
65     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
66   }
67 
ClearMatchspies()68   public void ClearMatchspies() {
69     XapianPINVOKE.Enquire_ClearMatchspies(swigCPtr);
70     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
71   }
72 
SetWeightingScheme(Weight weight_)73   public void SetWeightingScheme(Weight weight_) {
74     XapianPINVOKE.Enquire_SetWeightingScheme(swigCPtr, Weight.getCPtr(weight_));
75     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
76   }
77 
SetExpansionScheme(string eweightname_, double expand_k_)78   public void SetExpansionScheme(string eweightname_, double expand_k_) {
79     XapianPINVOKE.Enquire_SetExpansionScheme__SWIG_0(swigCPtr, eweightname_, expand_k_);
80     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
81   }
82 
SetExpansionScheme(string eweightname_)83   public void SetExpansionScheme(string eweightname_) {
84     XapianPINVOKE.Enquire_SetExpansionScheme__SWIG_1(swigCPtr, eweightname_);
85     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
86   }
87 
SetCollapseKey(uint collapse_key, uint collapse_max)88   public void SetCollapseKey(uint collapse_key, uint collapse_max) {
89     XapianPINVOKE.Enquire_SetCollapseKey__SWIG_0(swigCPtr, collapse_key, collapse_max);
90     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
91   }
92 
SetCollapseKey(uint collapse_key)93   public void SetCollapseKey(uint collapse_key) {
94     XapianPINVOKE.Enquire_SetCollapseKey__SWIG_1(swigCPtr, collapse_key);
95     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
96   }
97 
SetDocidOrder(Enquire.docid_order order)98   public void SetDocidOrder(Enquire.docid_order order) {
99     XapianPINVOKE.Enquire_SetDocidOrder(swigCPtr, (int)order);
100     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
101   }
102 
SetCutoff(int percent_cutoff, double weight_cutoff)103   public void SetCutoff(int percent_cutoff, double weight_cutoff) {
104     XapianPINVOKE.Enquire_SetCutoff__SWIG_0(swigCPtr, percent_cutoff, weight_cutoff);
105     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
106   }
107 
SetCutoff(int percent_cutoff)108   public void SetCutoff(int percent_cutoff) {
109     XapianPINVOKE.Enquire_SetCutoff__SWIG_1(swigCPtr, percent_cutoff);
110     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
111   }
112 
SetSortByRelevance()113   public void SetSortByRelevance() {
114     XapianPINVOKE.Enquire_SetSortByRelevance(swigCPtr);
115     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
116   }
117 
SetSortByValue(uint sort_key, bool reverse)118   public void SetSortByValue(uint sort_key, bool reverse) {
119     XapianPINVOKE.Enquire_SetSortByValue(swigCPtr, sort_key, reverse);
120     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
121   }
122 
SetSortByKey(KeyMaker sorter, bool reverse)123   public void SetSortByKey(KeyMaker sorter, bool reverse) {
124     XapianPINVOKE.Enquire_SetSortByKey(swigCPtr, KeyMaker.getCPtr(sorter), reverse);
125     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
126   }
127 
SetSortByValueThenRelevance(uint sort_key, bool reverse)128   public void SetSortByValueThenRelevance(uint sort_key, bool reverse) {
129     XapianPINVOKE.Enquire_SetSortByValueThenRelevance(swigCPtr, sort_key, reverse);
130     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
131   }
132 
SetSortByKeyThenRelevance(KeyMaker sorter, bool reverse)133   public void SetSortByKeyThenRelevance(KeyMaker sorter, bool reverse) {
134     XapianPINVOKE.Enquire_SetSortByKeyThenRelevance(swigCPtr, KeyMaker.getCPtr(sorter), reverse);
135     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
136   }
137 
SetSortByRelevanceThenValue(uint sort_key, bool reverse)138   public void SetSortByRelevanceThenValue(uint sort_key, bool reverse) {
139     XapianPINVOKE.Enquire_SetSortByRelevanceThenValue(swigCPtr, sort_key, reverse);
140     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
141   }
142 
SetSortByRelevanceThenKey(KeyMaker sorter, bool reverse)143   public void SetSortByRelevanceThenKey(KeyMaker sorter, bool reverse) {
144     XapianPINVOKE.Enquire_SetSortByRelevanceThenKey(swigCPtr, KeyMaker.getCPtr(sorter), reverse);
145     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
146   }
147 
SetTimeLimit(double time_limit)148   public void SetTimeLimit(double time_limit) {
149     XapianPINVOKE.Enquire_SetTimeLimit(swigCPtr, time_limit);
150     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
151   }
152 
GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset, MatchDecider mdecider)153   public MSet GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset, MatchDecider mdecider) {
154     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_0(swigCPtr, first, maxitems, checkatleast, RSet.getCPtr(omrset), MatchDecider.getCPtr(mdecider)), true);
155     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
156     return ret;
157   }
158 
GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset)159   public MSet GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset) {
160     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_1(swigCPtr, first, maxitems, checkatleast, RSet.getCPtr(omrset)), true);
161     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
162     return ret;
163   }
164 
GetMSet(uint first, uint maxitems, uint checkatleast)165   public MSet GetMSet(uint first, uint maxitems, uint checkatleast) {
166     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_2(swigCPtr, first, maxitems, checkatleast), true);
167     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
168     return ret;
169   }
170 
GetMSet(uint first, uint maxitems)171   public MSet GetMSet(uint first, uint maxitems) {
172     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_3(swigCPtr, first, maxitems), true);
173     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
174     return ret;
175   }
176 
GetMSet(uint first, uint maxitems, RSet omrset, MatchDecider mdecider)177   public MSet GetMSet(uint first, uint maxitems, RSet omrset, MatchDecider mdecider) {
178     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_4(swigCPtr, first, maxitems, RSet.getCPtr(omrset), MatchDecider.getCPtr(mdecider)), true);
179     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
180     return ret;
181   }
182 
GetMSet(uint first, uint maxitems, RSet omrset)183   public MSet GetMSet(uint first, uint maxitems, RSet omrset) {
184     MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_5(swigCPtr, first, maxitems, RSet.getCPtr(omrset)), true);
185     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
186     return ret;
187   }
188 
GetESet(uint maxitems, RSet omrset, int flags, ExpandDecider edecider, double min_wt)189   public ESet GetESet(uint maxitems, RSet omrset, int flags, ExpandDecider edecider, double min_wt) {
190     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_0(swigCPtr, maxitems, RSet.getCPtr(omrset), flags, ExpandDecider.getCPtr(edecider), min_wt), true);
191     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
192     return ret;
193   }
194 
GetESet(uint maxitems, RSet omrset, int flags, ExpandDecider edecider)195   public ESet GetESet(uint maxitems, RSet omrset, int flags, ExpandDecider edecider) {
196     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_1(swigCPtr, maxitems, RSet.getCPtr(omrset), flags, ExpandDecider.getCPtr(edecider)), true);
197     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
198     return ret;
199   }
200 
GetESet(uint maxitems, RSet omrset, int flags)201   public ESet GetESet(uint maxitems, RSet omrset, int flags) {
202     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_2(swigCPtr, maxitems, RSet.getCPtr(omrset), flags), true);
203     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
204     return ret;
205   }
206 
GetESet(uint maxitems, RSet omrset)207   public ESet GetESet(uint maxitems, RSet omrset) {
208     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_3(swigCPtr, maxitems, RSet.getCPtr(omrset)), true);
209     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
210     return ret;
211   }
212 
GetESet(uint maxitems, RSet omrset, ExpandDecider edecider)213   public ESet GetESet(uint maxitems, RSet omrset, ExpandDecider edecider) {
214     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_4(swigCPtr, maxitems, RSet.getCPtr(omrset), ExpandDecider.getCPtr(edecider)), true);
215     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
216     return ret;
217   }
218 
GetESet(uint maxitems, RSet rset, int flags, double k, ExpandDecider edecider, double min_wt)219   public ESet GetESet(uint maxitems, RSet rset, int flags, double k, ExpandDecider edecider, double min_wt) {
220     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_5(swigCPtr, maxitems, RSet.getCPtr(rset), flags, k, ExpandDecider.getCPtr(edecider), min_wt), true);
221     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
222     return ret;
223   }
224 
GetESet(uint maxitems, RSet rset, int flags, double k, ExpandDecider edecider)225   public ESet GetESet(uint maxitems, RSet rset, int flags, double k, ExpandDecider edecider) {
226     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_6(swigCPtr, maxitems, RSet.getCPtr(rset), flags, k, ExpandDecider.getCPtr(edecider)), true);
227     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
228     return ret;
229   }
230 
GetESet(uint maxitems, RSet rset, int flags, double k)231   public ESet GetESet(uint maxitems, RSet rset, int flags, double k) {
232     ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_7(swigCPtr, maxitems, RSet.getCPtr(rset), flags, k), true);
233     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
234     return ret;
235   }
236 
GetMatchingTermsBegin(uint did)237   public TermIterator GetMatchingTermsBegin(uint did) {
238     TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsBegin__SWIG_0(swigCPtr, did), true);
239     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
240     return ret;
241   }
242 
GetMatchingTermsEnd(uint arg0)243   public TermIterator GetMatchingTermsEnd(uint arg0) {
244     TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsEnd__SWIG_0(swigCPtr, arg0), true);
245     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
246     return ret;
247   }
248 
GetMatchingTermsBegin(MSetIterator it)249   public TermIterator GetMatchingTermsBegin(MSetIterator it) {
250     TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsBegin__SWIG_1(swigCPtr, MSetIterator.getCPtr(it)), true);
251     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
252     return ret;
253   }
254 
GetMatchingTermsEnd(MSetIterator arg0)255   public TermIterator GetMatchingTermsEnd(MSetIterator arg0) {
256     TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsEnd__SWIG_1(swigCPtr, MSetIterator.getCPtr(arg0)), true);
257     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
258     return ret;
259   }
260 
GetDescription()261   public string GetDescription() {
262     string ret = XapianPINVOKE.Enquire_GetDescription(swigCPtr);
263     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
264     return ret;
265   }
266 
267   public enum docid_order {
268     ASCENDING = 1,
269     DESCENDING = 0,
270     DONT_CARE = 2
271   }
272 
273   public static readonly int INCLUDE_QUERY_TERMS = XapianPINVOKE.Enquire_INCLUDE_QUERY_TERMS_get();
274   public static readonly int USE_EXACT_TERMFREQ = XapianPINVOKE.Enquire_USE_EXACT_TERMFREQ_get();
275 }
276 
277 }
278