1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267
|
//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (https://www.swig.org).
// Version 4.3.0
//
// Do not make changes to this file unless you know what you are doing - modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------
namespace Xapian {
public class MSet : global::System.IDisposable {
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
protected bool swigCMemOwn;
internal MSet(global::System.IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(MSet obj) {
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
internal static global::System.Runtime.InteropServices.HandleRef swigRelease(MSet obj) {
if (obj != null) {
if (!obj.swigCMemOwn)
throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.Dispose();
return ptr;
} else {
return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
~MSet() {
Dispose(false);
}
public void Dispose() {
Dispose(true);
global::System.GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing) {
lock(this) {
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
XapianPINVOKE.delete_MSet(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
}
}
public MSet() : this(XapianPINVOKE.new_MSet(), true) {
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public int ConvertToPercent(double weight) {
int ret = XapianPINVOKE.MSet_ConvertToPercent__SWIG_0(swigCPtr, weight);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int ConvertToPercent(MSetIterator it) {
int ret = XapianPINVOKE.MSet_ConvertToPercent__SWIG_1(swigCPtr, MSetIterator.getCPtr(it));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetTermFreq(string term) {
uint ret = XapianPINVOKE.MSet_GetTermFreq(swigCPtr, term);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetTermWeight(string term) {
double ret = XapianPINVOKE.MSet_GetTermWeight(swigCPtr, term);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetFirstItem() {
uint ret = XapianPINVOKE.MSet_GetFirstItem(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesLowerBound() {
uint ret = XapianPINVOKE.MSet_GetMatchesLowerBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesEstimated() {
uint ret = XapianPINVOKE.MSet_GetMatchesEstimated(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesUpperBound() {
uint ret = XapianPINVOKE.MSet_GetMatchesUpperBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesLowerBound() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesLowerBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesEstimated() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesEstimated(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesUpperBound() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesUpperBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetMaxAttained() {
double ret = XapianPINVOKE.MSet_GetMaxAttained(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetMaxPossible() {
double ret = XapianPINVOKE.MSet_GetMaxPossible(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length, Stem stemmer, uint flags, string hi_start, string hi_end, string omit) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_0(swigCPtr, text, length, Stem.getCPtr(stemmer), flags, hi_start, hi_end, omit);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length, Stem stemmer, uint flags, string hi_start, string hi_end) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_1(swigCPtr, text, length, Stem.getCPtr(stemmer), flags, hi_start, hi_end);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length, Stem stemmer, uint flags, string hi_start) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_2(swigCPtr, text, length, Stem.getCPtr(stemmer), flags, hi_start);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length, Stem stemmer, uint flags) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_3(swigCPtr, text, length, Stem.getCPtr(stemmer), flags);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length, Stem stemmer) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_4(swigCPtr, text, length, Stem.getCPtr(stemmer));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text, uint length) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_5(swigCPtr, text, length);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string Snippet(string text) {
string ret = XapianPINVOKE.MSet_Snippet__SWIG_6(swigCPtr, text);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Fetch(MSetIterator begin, MSetIterator end) {
XapianPINVOKE.MSet_Fetch__SWIG_0(swigCPtr, MSetIterator.getCPtr(begin), MSetIterator.getCPtr(end));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public void Fetch(MSetIterator item) {
XapianPINVOKE.MSet_Fetch__SWIG_1(swigCPtr, MSetIterator.getCPtr(item));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public void Fetch() {
XapianPINVOKE.MSet_Fetch__SWIG_2(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public uint Size() {
uint ret = XapianPINVOKE.MSet_Size(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool Empty() {
bool ret = XapianPINVOKE.MSet_Empty(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator Begin() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_Begin(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator End() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_End(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator Back() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_Back(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string GetDescription() {
string ret = XapianPINVOKE.MSet_GetDescription(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetDocId(uint i) {
uint ret = XapianPINVOKE.MSet_GetDocId(swigCPtr, i);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Document GetDocument(uint i) {
Document ret = new Document(XapianPINVOKE.MSet_GetDocument(swigCPtr, i), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator GetHit(uint i) {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_GetHit(swigCPtr, i), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int GetDocumentPercentage(uint i) {
int ret = XapianPINVOKE.MSet_GetDocumentPercentage(swigCPtr, i);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static readonly int SNIPPET_BACKGROUND_MODEL = XapianPINVOKE.MSet_SNIPPET_BACKGROUND_MODEL_get();
public static readonly int SNIPPET_EXHAUSTIVE = XapianPINVOKE.MSet_SNIPPET_EXHAUSTIVE_get();
public static readonly int SNIPPET_EMPTY_WITHOUT_MATCH = XapianPINVOKE.MSet_SNIPPET_EMPTY_WITHOUT_MATCH_get();
public static readonly int SNIPPET_NGRAMS = XapianPINVOKE.MSet_SNIPPET_NGRAMS_get();
public static readonly int SNIPPET_CJK_NGRAM = XapianPINVOKE.MSet_SNIPPET_CJK_NGRAM_get();
}
}
|